- Revert verbatim line numbering changes since they broke callouts and
other inline markup PR: docs/187773 Submitted by: Allan Jude <freebsd@allanjude.com>
This commit is contained in:
parent
e3e50f9ca5
commit
8858f6979c
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44350
2 changed files with 9 additions and 91 deletions
|
@ -275,46 +275,23 @@ html {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.screen {
|
||||
white-space: pre-wrap;
|
||||
pre.screen {
|
||||
white-space: pre;
|
||||
overflow: auto;
|
||||
font-family: monospace;
|
||||
padding: 1ex;
|
||||
background-color: #edc;
|
||||
border-style: solid;
|
||||
border-color: #EEB985;
|
||||
border-width: 0 0 0 2.5em;
|
||||
border-radius: 6px;
|
||||
counter-reset: code;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.programlisting {
|
||||
white-space: pre-wrap;
|
||||
pre.programlisting {
|
||||
white-space: pre;
|
||||
overflow: auto;
|
||||
font-family: monospace;
|
||||
padding: 1ex;
|
||||
background-color: #eee;
|
||||
border-style: solid;
|
||||
border-color: #BABABA;
|
||||
border-width: 0 0 0 2.5em;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
counter-reset: code;
|
||||
}
|
||||
|
||||
span.verbatim {
|
||||
counter-increment: code;
|
||||
display: block;
|
||||
padding: 0 0.5em 0 3.75em;
|
||||
position: relative;
|
||||
margin: 0 -0.3em 0 -3.85em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
span.verbatim:before {
|
||||
width: 3em;
|
||||
text-align: right;
|
||||
content: counter(code);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: #404040;
|
||||
}
|
||||
|
||||
@media screen { /* hide from IE3 */
|
||||
|
@ -408,7 +385,7 @@ span.verbatim:before {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.screen strong {
|
||||
pre.screen strong {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
version='1.0'
|
||||
xmlns:str="http://exslt.org/strings"
|
||||
xmlns:db="http://docbook.org/ns/docbook"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
exclude-result-prefixes="db"
|
||||
extension-element-prefixes="str">
|
||||
|
||||
|
@ -32,7 +31,6 @@
|
|||
<xsl:param name="generate.manifest" select="1"/>
|
||||
<xsl:param name="generate.meta.abstract" select="1"/>
|
||||
<xsl:param name="html.longdesc" select="0"/>
|
||||
<xsl:param name="hyphenate.verbatim" select="1"/>
|
||||
|
||||
<xsl:param name="make.valid.html" select="1"/>
|
||||
<xsl:param name="html.cleanup" select="1"/>
|
||||
|
@ -294,61 +292,4 @@
|
|||
|
||||
<hr/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="wrap.text">
|
||||
<xsl:param name="content"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with($content, '
')">
|
||||
<span class="verbatim">​</span>
|
||||
|
||||
<xsl:call-template name="wrap.text">
|
||||
<xsl:with-param name="content" select="substring-after($content, '
')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="contains($content, '
')">
|
||||
<span class="verbatim"><xsl:value-of select="substring-before($content, '
')"/>
</span>
|
||||
|
||||
<xsl:call-template name="wrap.text">
|
||||
<xsl:with-param name="content" select="substring-after($content, '
')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<span class="verbatim"><xsl:value-of select="$content"/>
</span>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- XXX: breaks line numbering and syntax highlighting that we do not use
|
||||
anyway -->
|
||||
<xsl:template match="db:programlisting|db:screen|db:synopsis">
|
||||
<xsl:variable name="id">
|
||||
<xsl:call-template name="object.id"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="anchor"/>
|
||||
|
||||
<xsl:variable name="div.element">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$make.clean.html != 0">div</xsl:when>
|
||||
<xsl:otherwise>pre</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
|
||||
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
||||
<xsl:if test="@width != ''">
|
||||
<xsl:attribute name="width">
|
||||
<xsl:value-of select="@width"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="wrap.text">
|
||||
<xsl:with-param name="content">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
Loading…
Reference in a new issue