On Thu, Mar 08, 2007 at 09:59:26AM +0000, Eur Ing Chris Green wrote:
On Thu, Mar 08, 2007 at 09:53:33AM +0000, W.B.Hill wrote:
The kitten on the keyboard of Eur Ing Chris Green resulted in::
I'm trying to understand and unpick an HTML template file, an automatic 'beautifier' would help no end, are there any out there?
[snip]
I don't want an HTML *validator*, I want an HTML *beautifier* so that it's prettily indented so I can understand it.
I use vile (another vi clone) which also has a good HTML mode with syntax highlighting etc. but I don't think any editor is likely to be able to auto-format HTML (well, no doubt they *could* but it's not a common requirement or ability).
Emacs has a HTML mode which supports emacs's generic "code grinding" mechanisms.
I just tried loading one of my old HTML files and running the "indent-region" command on it. That made a neat "staircase" out of a lengthy unordered list (<ul> ... </ul>), because back when I wrote that file I didn't use closing tags for list items (</li>) -- so it at least does indent according to the HTML syntax which may be useful to understand the structure of unknown HTML code.
Best regards, Jan