3

I have a number of HTML files that contain snippets of HTML code (not full pages, so no body tags, etc). Unfortunately the HTML in those files is completely unindented.

I'd like to run tidy to re-indent the file, but tidy tries to do a lot of other things that I don't want it to do. The only modification I want made to the file in indent.

Is there any way to turn off all the other tidy behavior and just have it indent, or another tool (I'm on linux) that I could use to achieve this?

Herms
  • 9,992

1 Answers1

1

There's a similar stackoverflow question that seems to have some decent answers here:

https://stackoverflow.com/questions/7151180/use-html-tidy-to-just-indent-html-code

Weston C
  • 131