- documentation/quickref.xsl

- Includes <p> support
  - Matches the description class name in quickref.include.xsl
  - Styles <br /> to enforce vertical spacing (in the reference table only).
- documentation/style.css
  - Styles <br /> to enforce vertical spacing (in the reference table only).
- documentation/tidy1.xsl.in
  - Includes <p> support.
  - Better manages line breaks with .sp1 instead of .br.
- src/localize.c
  - Legibility to the troublesome `drop-font-tags` description.
This commit is contained in:
Jim Derry 2015-10-30 23:58:43 +08:00
parent 709ac8cb4c
commit 8c5fae8c09
4 changed files with 50 additions and 13 deletions

View File

@ -212,7 +212,7 @@
</tr>
<tr>
<td colspan="2"><xsl:copy-of select="description/node()"/></td>
<td colspan="2" class="qdescription"><xsl:apply-templates select="description"/></td>
</tr>
<tr>
@ -415,6 +415,14 @@
font-weight: normal;
background-color: #f5f5f5
}
/* BR IN TABLE DATA DESCRIPTION */
td.qdescription br
{
content: " ";
display: block;
margin: 10px 0;
}
/* GLOSSARY TERM */
td.term, font.term, .term, a:link.term, a:visited.term, a:active.term
@ -565,7 +573,7 @@
<!-- Regular Templates: -->
<xsl:template match="a | code | em | strong | br">
<xsl:template match="a | code | em | strong | br | p">
<xsl:element name="{local-name(.)}">
<xsl:copy-of select="@* | node()" />
</xsl:element>

View File

@ -301,4 +301,10 @@ h4.qoptiontitle {
line-height: 140%;
border-left: 1px solid #bbbbbb;
border-bottom: 1px solid #bbbbbb;
}
}
td.qdescription br {
content: " ";
display: block;
margin: 10px 0;
}

View File

@ -403,9 +403,26 @@ The sources for \fBHTML Tidy\fR are available at https://github.com/htacg/tidy-h
<xsl:text />\fI<xsl:call-template name="escape-backslash" />\fR<xsl:text />
</xsl:template>
<xsl:template match="p[1]">
<xsl:text>
.sp 1
</xsl:text>
<xsl:text /><xsl:call-template name="escape-backslash" />
</xsl:template>
<xsl:template match="p[position() != 1]">
<xsl:text>
.sp 1
</xsl:text>
<xsl:text /><xsl:call-template name="escape-backslash" />
<xsl:text>
.sp 1
</xsl:text>
</xsl:template>
<xsl:template match="br">
<xsl:text>
.br
.sp 1
</xsl:text>
</xsl:template>

View File

@ -370,7 +370,10 @@ static const TidyOptionId TidyDropFontTagsLinks[] =
/* Documentation of options
** As of 2015-October these descriptions are used uniquely by
** printXMLDescription from which quickref.html and the Unix
** man pages are generated.
** man pages are generated, and the xslt for building all
** documentation now supports the following tags in descriptions:
** <code>, <em>, <strong>, <br />, <p>
** Note that the xslt processor requires <br /> to be self closing!
*/
static const TidyOptionDoc option_docs[] =
{
@ -454,14 +457,17 @@ static const TidyOptionDoc option_docs[] =
"This option specifies if Tidy should discard empty paragraphs. "
},
{TidyDropFontTags,
"Deprecated; <strong>DO NOT USE</strong>. This option is destructive to &lt;font&gt; tags, "
"and it will be removed from future versions of Tidy. Use the clean option "
"instead. If you do set this option despite the warning it will perform "
"as clean except styles will be inline instead of put into a CSS class. "
"&lt;font&gt; tags will be dropped completely and their styles will not be "
"preserved. If both clean and this option are enabled, &lt;font&gt; tags "
"will still be dropped completely, and other styles will be preserved in a "
"CSS class instead of inline. See clean for more information. "
"Deprecated; <em>do not use</em>. This option is destructive to "
"&lt;font&gt; tags, and it will be removed from future versions of Tidy. "
"Use the <code>clean</code> option instead. "
"<br/>If you do set this option despite the warning it will perform "
"as <code>clean</code> except styles will be inline instead of put into "
"a CSS class. &lt;font&gt; tags will be dropped completely and their styles "
"will not be preserved. "
"<br />If both <code>clean</code> and this option are enabled, "
"&lt;font&gt; tags will still be dropped completely, and other styles will "
"be preserved in a CSS class instead of inline. "
"<br/>See <code>clean</code> for more information. "
, TidyDropFontTagsLinks
},
{TidyDropPropAttrs,