aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2013-07-30 14:37:49 +0200
committerPatrik Nyblom <[email protected]>2013-08-09 12:10:53 +0200
commit3e760de63ba212dd6e1e1de6d797202c60fcb26a (patch)
tree9461324a74fb9c5975686b91377aa24639b65896 /lib
parentc83abd94e3b69cad2927378123c5f10c7f8aafe5 (diff)
downloadotp-3e760de63ba212dd6e1e1de6d797202c60fcb26a.tar.gz
otp-3e760de63ba212dd6e1e1de6d797202c60fcb26a.tar.bz2
otp-3e760de63ba212dd6e1e1de6d797202c60fcb26a.zip
Fix backslash in titles of manpages
A cludge which replaces one backslash with three in section headers when generating manpages from xml files.
Diffstat (limited to 'lib')
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
index 33808859c7..3bcdd11c35 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -454,13 +454,21 @@
<!-- *ref/Section -->
<xsl:template match="erlref/section|comref/section|cref/section|fileref/section|appref/section">
- <xsl:text>&#10;.SH "</xsl:text><xsl:value-of select="translate(title, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:text>"&#10;</xsl:text>
+ <xsl:text>&#10;.SH "</xsl:text><xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="translate(title, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
+ <xsl:with-param name="replace" select="&quot;\&quot;" />
+ <xsl:with-param name="with" select="&quot;\\\&quot;" />
+ </xsl:call-template><xsl:text>"&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>
<!-- *ref/Subsection -->
<xsl:template match="section/section">
- <xsl:text>&#10;.SS "</xsl:text><xsl:value-of select="title"/><xsl:text>"&#10;</xsl:text>
+ <xsl:text>&#10;.SS "</xsl:text><xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="title" />
+ <xsl:with-param name="replace" select="&quot;\&quot;" />
+ <xsl:with-param name="with" select="&quot;\\\&quot;" />
+ </xsl:call-template><xsl:text>"&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>