aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen/priv/xsl/db_html.xsl
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2017-10-10 08:46:18 +0200
committerLars Thorsen <[email protected]>2017-10-10 08:46:18 +0200
commita803be12d22b7b91ba9d0c7d781c5228eaaeb47e (patch)
tree96b2db81508118a8a2b62602243235f386b6b582 /lib/erl_docgen/priv/xsl/db_html.xsl
parent8b62a926eb1f6cd77997d68585fa60689e7c7400 (diff)
parenta23e06da1942801b253e5e4f7461b318d8508ea6 (diff)
downloadotp-a803be12d22b7b91ba9d0c7d781c5228eaaeb47e.tar.gz
otp-a803be12d22b7b91ba9d0c7d781c5228eaaeb47e.tar.bz2
otp-a803be12d22b7b91ba9d0c7d781c5228eaaeb47e.zip
Merge branch 'lars/erl_docgen/code-tag-fix/OTP-14674' into maint
* lars/erl_docgen/code-tag-fix/OTP-14674: [erl_docgen] Fix spacing for code blocks [erl_docgen] Change pdf to have the same style as html for code,warning,note
Diffstat (limited to 'lib/erl_docgen/priv/xsl/db_html.xsl')
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index a5e277aece..75614392fb 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -30,6 +30,7 @@
xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<xsl:include href="db_html_params.xsl"/>
+ <xsl:include href="db_funcs.xsl"/>
<func:function name="erl:flip_first_char">
<xsl:param name="in"/>
@@ -1132,7 +1133,14 @@
<xsl:variable name="codenum">
<xsl:number level="any" from="chapter" count="code"/>
</xsl:variable>
- <div class="example"><pre><xsl:apply-templates/></pre></div>
+ <xsl:choose>
+ <xsl:when test="not(descendant::anno)">
+ <div class="example"><pre><xsl:value-of select="erl:code_trim(text())"/></pre></div>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="example"><pre><xsl:apply-templates/></pre></div>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Pre -->