1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-24 11:15:26 +02:00
tldr/pages/common/tidy.md
Vitor Henrique 0ff4322026
tidy: add page (#12024)
* tidy: add page

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-01-08 21:57:38 +05:30

553 B

tidy

Clean up and pretty print HTML, XHTML and XML files. NOTE: tidy cannot preserve original indentation. More information: https://api.html-tidy.org/tidy/tidylib_api_5.2.0/tidy_cmd.html.

  • Pretty print an HTML file:

tidy {{path/to/file.html}}

  • Enable [i]ndentation, [w]rapping lines in 100, saving to output.html:

tidy --indent y --wrap 100 -output {{path/to/output.html}} {{path/to/file.html}}

  • Modify an HTML file in-place using a configuration file:

tidy -config {{path/to/configuration}} -modify {{path/to/file.html}}