Skip to content

Commit

Permalink
tidy: add page (#12024)
Browse files Browse the repository at this point in the history
* tidy: add page

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
  • Loading branch information
3 people committed Jan 8, 2024
1 parent 0ce0a6c commit 0ff4322
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pages/common/tidy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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}}`

0 comments on commit 0ff4322

Please sign in to comment.