Wanted: Command line HTML5 beautifier

Posted by blinry on Stack Overflow See other posts from Stack Overflow or by blinry
Published on 2010-04-17T07:41:50Z Indexed on 2010/04/30 11:27 UTC
Read the original article Hit count: 313

Filed under:
|
|
|
|

Wanted

A command line HTML5 beautifier running under Linux.

Input

Garbled, ugly HTML5 code. Possibly the result of multiple templates. You don't love it, it doesn't love you.

Output

Pure beauty. The code is nicely indented, has enough line breaks, cares for it's whitespace. Rather than viewing it in a webbrowser, you would like to display the code on your website directly.

Suspects

  • tidy does too much (heck, it alters my doctype!), and it doesn't work well with HTML5. Maybe there is a way to make it cooperate and not alter anything?
  • vim does too little. It only indents. I want the program to add and remove line breaks, and to play with the whitespace inside of tags.

DEAD OR ALIVE!

© Stack Overflow or respective owner

Related posts about html5

Related posts about pretty-print