Documentation improvements.

This commit is contained in:
Jim Derry 2015-11-01 19:05:03 +08:00
parent 678a2a20d1
commit 807fed4ff6

View file

@ -678,10 +678,14 @@ static const TidyOptionDoc option_docs[] =
}, },
{TidyNumEntities, {TidyNumEntities,
"This option specifies if Tidy should output entities other than the " "This option specifies if Tidy should output entities other than the "
"built-in HTML entities (&amp;amp;, &amp;lt;, &amp;gt; and &amp;quot;) in " "built-in HTML entities (<code>&amp;amp;</code>, <code>&amp;lt;</code>, "
"the numeric rather than the named entity form. Only entities compatible " "<code>&amp;gt;</code>, and <code>&amp;quot;</code>) in the numeric rather "
"with the DOCTYPE declaration generated are used. Entities that can be " "than the named entity form. "
"represented in the output encoding are translated correspondingly. " "<br/>"
"Only entities compatible with the DOCTYPE declaration generated are used. "
"<br/>"
"Entities that can be represented in the output encoding are translated "
"correspondingly. "
,TidyNumEntitiesLinks ,TidyNumEntitiesLinks
}, },
{TidyHtmlOut, {TidyHtmlOut,
@ -691,30 +695,38 @@ static const TidyOptionDoc option_docs[] =
{TidyXhtmlOut, {TidyXhtmlOut,
"This option specifies if Tidy should generate pretty printed output, " "This option specifies if Tidy should generate pretty printed output, "
"writing it as extensible HTML. " "writing it as extensible HTML. "
"<br/>"
"This option causes Tidy to set the DOCTYPE and default namespace as " "This option causes Tidy to set the DOCTYPE and default namespace as "
"appropriate to XHTML. If a DOCTYPE or namespace is given they will " "appropriate to XHTML, and will use the corrected value in output "
"checked for consistency with the content of the document. In the case of " "regardless of other sources. "
"an inconsistency, the corrected values will appear in the output. For " "<br/>"
"XHTML, entities can be written as named or numeric entities according to " "For XHTML, entities can be written as named or numeric entities according "
"the setting of the \"numeric-entities\" option. The original case of tags " "to the setting of <code>numeric-entities</code>. "
"and attributes will be preserved, regardless of other options. " "<br/>"
"The original case of tags and attributes will be preserved, regardless of "
"other options. "
}, },
{TidyXmlOut, {TidyXmlOut,
"This option specifies if Tidy should pretty print output, writing it as " "This option specifies if Tidy should pretty print output, writing it as "
"well-formed XML. Any entities not defined in XML 1.0 will be written as " "well-formed XML. "
"numeric entities to allow them to be parsed by a XML parser. The original " "<br/>"
"case of tags and attributes will be preserved, regardless of other " "Any entities not defined in XML 1.0 will be written as numeric entities to "
"options. " "allow them to be parsed by an XML parser. "
"<br/>"
"The original case of tags and attributes will be preserved, regardless of "
"other options. "
}, },
{TidyQuoteAmpersand, {TidyQuoteAmpersand,
"This option specifies if Tidy should output unadorned &amp; characters as " "This option specifies if Tidy should output unadorned <code>&amp;</code> "
"&amp;amp;. " "characters as <code>&amp;amp;</code>. "
}, },
{TidyQuoteMarks, {TidyQuoteMarks,
"This option specifies if Tidy should output &quot; characters as " "This option specifies if Tidy should output <code>&quot;</code> characters "
"&amp;quot; as is preferred by some editing environments. The apostrophe " "as <code>&amp;quot;</code> as is preferred by some editing environments. "
"character ' is written out as &amp;#39; since many web browsers don't yet " "<br/>"
"support &amp;apos;. " "The apostrophe character <code>'</code> is written out as "
"<code>&amp;#39;</code> since many web browsers don't yet support "
"<code>&amp;apos;</code>. "
}, },
{TidyQuoteNbsp, {TidyQuoteNbsp,
"This option specifies if Tidy should output non-breaking space characters " "This option specifies if Tidy should output non-breaking space characters "
@ -722,24 +734,29 @@ static const TidyOptionDoc option_docs[] =
}, },
{TidyDuplicateAttrs, {TidyDuplicateAttrs,
"This option specifies if Tidy should keep the first or last attribute, if " "This option specifies if Tidy should keep the first or last attribute, if "
"an attribute is repeated, e.g. has two align attributes. " "an attribute is repeated, e.g. has two <code>align</code> attributes. "
, TidyDuplicateAttrsLinks , TidyDuplicateAttrsLinks
}, },
{TidySortAttributes, {TidySortAttributes,
"This option specifies that tidy should sort attributes within an element " "This option specifies that tidy should sort attributes within an element "
"using the specified sort algorithm. If set to \"alpha\", the algorithm is " "using the specified sort algorithm. If set to <code>alpha</code>, the "
"an ascending alphabetic sort. " "algorithm is an ascending alphabetic sort. "
}, },
{TidyReplaceColor, {TidyReplaceColor,
"This option specifies if Tidy should replace numeric values in color " "This option specifies if Tidy should replace numeric values in color "
"attributes by HTML/XHTML color names where defined, e.g. replace " "attributes with HTML/XHTML color names where defined, e.g. replace "
"\"#ffffff\" with \"white\". " "<code>#ffffff</code> with <code>white</code>. "
}, },
{TidyBodyOnly, {TidyBodyOnly,
"This option specifies if Tidy should print only the contents of the " "This option specifies if Tidy should print only the contents of the "
"body tag as an HTML fragment. If set to \"auto\", this is performed only " "body tag as an HTML fragment. "
"if the body tag has been inferred. Useful for incorporating " "<br/>"
"existing whole pages as a portion of another page. " "If set to <code>auto</code>, this is performed only if the body tag has "
"been inferred. "
"<br/>"
"Useful for incorporating existing whole pages as a portion of another "
"page. "
"<br/>"
"This option has no effect if XML output is requested. " "This option has no effect if XML output is requested. "
}, },
{TidyUpperCaseAttrs, {TidyUpperCaseAttrs,