Possible duplicate:
How to make HTML Tidy not put a newline before closing tags?
I have been using htmltidy for several days, but there is always an βerrorβ when using it. This error will automatically wrap my script tag!
I should mention that these are just built-in scripts that only reference external scripts.
After searching for advanced commands, I still cannot solve this strange problem. Has anyone ever encountered such a situation before?
My personal settings
indent: auto indent-spaces: 4 wrap: 0 tidy-mark: no char-encoding: utf8 doctype: auto
My non-tidied test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="css/generic.css" type="text/css"> <script src="js/jquery.min.js" type="text/javascript"></script> </head> <body> </body> </html>
My tidied test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="css/generic.css" type="text/css"> <script src="js/jquery.min.js" type="text/javascript"> </script> </head> <body> </body> </html>
source share