diff options
author | Lars Thorsen <[email protected]> | 2017-10-09 10:21:46 +0200 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2017-10-09 10:21:46 +0200 |
commit | a23e06da1942801b253e5e4f7461b318d8508ea6 (patch) | |
tree | 7dd4b9221ef1e7a5e450d9960814a8b9233791e5 /lib/erl_docgen/priv/xsl/db_pdf.xsl | |
parent | d26187bcd2c12cfc126367f510a812b7b47899f2 (diff) | |
download | otp-a23e06da1942801b253e5e4f7461b318d8508ea6.tar.gz otp-a23e06da1942801b253e5e4f7461b318d8508ea6.tar.bz2 otp-a23e06da1942801b253e5e4f7461b318d8508ea6.zip |
[erl_docgen] Fix spacing for code blocks
Diffstat (limited to 'lib/erl_docgen/priv/xsl/db_pdf.xsl')
-rw-r--r-- | lib/erl_docgen/priv/xsl/db_pdf.xsl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl index a9abd0270f..46de66bcd8 100644 --- a/lib/erl_docgen/priv/xsl/db_pdf.xsl +++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl @@ -23,12 +23,16 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" - extension-element-prefixes="exsl" - xmlns:fo="http://www.w3.org/1999/XSL/Format"> + xmlns:func="http://exslt.org/functions" + xmlns:erl="http://erlang.org" + extension-element-prefixes="exsl func" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <xsl:output method="xml" indent="yes"/> <xsl:include href="db_pdf_params.xsl"/> + <xsl:include href="db_funcs.xsl"/> <!-- Start of Dialyzer type/spec tags. See also the templates matching "name" and "seealso" as well as @@ -1234,7 +1238,14 @@ </xsl:variable> <fo:block xsl:use-attribute-sets="code"> - <xsl:apply-templates select="text()"/> + <xsl:choose> + <xsl:when test="not(descendant::anno)"> + <xsl:value-of select="erl:code_trim(text())"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> </fo:block> <xsl:if test="@caption"> |