From 5fde57fcd45b9097bc4acf43c7cb0f136cb38d34 Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 6 Mar 2015 01:01:22 +0000 Subject: [PATCH] Add featured options, and include config list --- build/documentation/.gitignore | 2 +- build/documentation/build_docs.sh | 4 +- build/documentation/pages/main_page.dox | 11 +- .../pages/page_featured_options.dox | 142 ++++++++++++++++++ build/documentation/pages/page_tidy.dox | 5 +- .../documentation/pages/page_tidy_config.dox | 7 +- 6 files changed, 160 insertions(+), 11 deletions(-) create mode 100644 build/documentation/pages/page_featured_options.dox diff --git a/build/documentation/.gitignore b/build/documentation/.gitignore index ea87efb..90f15a5 100644 --- a/build/documentation/.gitignore +++ b/build/documentation/.gitignore @@ -1,7 +1,7 @@ # file created during build_docs # = tidy5 -h > tidy5.cmd.txt -examples/tidy5.cmd.txt +examples/tidy5.*.txt # The license file needs to copies to examples for \include examples/LICENSE.md diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh index dfc438a..d1baa29 100755 --- a/build/documentation/build_docs.sh +++ b/build/documentation/build_docs.sh @@ -108,7 +108,9 @@ if [ "$BUILD_API" -eq 1 ]; then echo "The following is doxygen's stderr output. It doesn't indicate errors with this script:\n" # echo the output of tidy5 --help so we can include - $TIDY_PATH -h > "./examples/tidy5.cmd.txt" + $TIDY_PATH -h > "./examples/tidy5.help.txt" + $TIDY_PATH -help-config > "./examples/tidy5.config.txt" + ## copy license file to examples for includsing cp ../../LICENSE.md ./examples/ diff --git a/build/documentation/pages/main_page.dox b/build/documentation/pages/main_page.dox index 667b6f4..cc3e6fb 100644 --- a/build/documentation/pages/main_page.dox +++ b/build/documentation/pages/main_page.dox @@ -24,20 +24,21 @@ is converted to \endcode -

tidy and this project has two parts

+

This project has two parts:

- \ref tidylib - - is a C static or dynamic library that developers can integrate into their applications + - a C static or dynamic library that developers can integrate into their applications in order to bring all of Tidy’s power to your favorite tools. -- \ref tidy5_cmd - - is a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. +- \ref tidy_cmd + - a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. \section content Contents -- \ref tidy5_cmd +- \ref tidy_cmd - \ref tidy_quickstart - \ref tidy_config + - \ref featured_options - \ref tidy_scripting - \ref tidylib - Modules diff --git a/build/documentation/pages/page_featured_options.dox b/build/documentation/pages/page_featured_options.dox new file mode 100644 index 0000000..8e751a6 --- /dev/null +++ b/build/documentation/pages/page_featured_options.dox @@ -0,0 +1,142 @@ +/*! + + +\page featured_options Featured Options + +\section indenting Indenting output for readability + +Indenting the source markup of an HTML document makes the markup easier to read. Tidy can indent the +markup for an HTML document while recognizing elements whose contents should not be indented. In the +example below, Tidy indents the output while preserving the formatting of the `
` element:
+
+Input:
+\code{.html}
+
+ 
+ Test document
+ 
+ 
+ 

This example shows how Tidy can indent output while preserving + formatting of particular elements.

+ +
This is
+ genuine
+       preformatted
+    text
+ 
+ + + \endcode + + Output: +\code{.html} + + + Test document + + + +

This example shows how Tidy can indent output while preserving + formatting of particular elements.

+
+This is
+genuine
+       preformatted
+   text
+
+ + +\endcode + +Tidy’s indenting behavior is not perfect and can sometimes cause your output to be rendered by browsers in a different way than the input. You can +avoid unexpected indenting-related rendering problems by setting `indent:no` or `indent:auto` in a config file. + +\note + Preserving original indenting not possible

+ Tidy is not capable of preserving the original indenting of the markup from the input it receives. That’s because Tidy starts by + building a clean parse tree from the input, and that parse tree doesn’t contain any information about the original indenting. Tidy then + pretty-prints the parse tree using the current config settings. Trying to preserve the original + indenting from the input would interact badly with the repair operations needed to build a clean parse tree, and would considerably complicate the code. + + +\section encodings Encodings and character references + +Tidy defaults to assuming you want output to be encoded in `UTF-8`. But Tidy offers you a choice of other +character encodings: `US ASCII`, `ISO Latin-1`, and the `ISO 2022` family of 7 bit encodings. + +Tidy doesn’t yet recognize the use of the HTML `` element for specifying the character encoding. + +The full set of HTML character references are defined. Cleaned-up output uses named character references for characters when appropriate. Otherwise, +characters outside the normal range are output as numeric character references. + +\section accessibility Accessibility + +Tidy offers advice on potential accessibility problems for people using non-graphical browsers. + +\section cleaning_presentational Cleaning up presentational markup + +Some tools generate HTML with presentational elements such as ``, ``, and `
`. Tidy’s -clean option will replace those elements with `