Skip to content

Commit

Permalink
Fix backslash in titles of manpages
Browse files Browse the repository at this point in the history
A cludge which replaces one backslash with three in section headers when
generating manpages from xml files.
  • Loading branch information
bufflig committed Aug 9, 2013
1 parent c83abd9 commit 3e760de
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/erl_docgen/priv/xsl/db_man.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 3e760de

Please sign in to comment.