mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Merge pull request #24 from Lastique/feature/fix_doxygen_enum_initializers
Fix duplicate equal signs in Doxygen-generated enum value initializers
This commit is contained in:
commit
d5ac8b1cdd
@ -324,7 +324,8 @@
|
||||
|
||||
<xsl:if test="initializer">
|
||||
<default>
|
||||
<xsl:apply-templates select="initializer/*|initializer/text()" mode="passthrough"/>
|
||||
<xsl:apply-templates select="initializer/*|initializer/text()"
|
||||
mode="enumvalue.initializer"/>
|
||||
</default>
|
||||
</xsl:if>
|
||||
|
||||
@ -336,6 +337,24 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()" mode="enumvalue.initializer">
|
||||
<!-- Remove the leading '=' sign from enum value initializers, the '='
|
||||
character will be added later, by the templates processing <default>
|
||||
tags. -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(normalize-space(string(.)), '=')">
|
||||
<xsl:value-of select="normalize-space(substring-after(string(.), '='))"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="enumvalue.initializer">
|
||||
<xsl:apply-templates mode="passthrough"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="doxygen.include.header.rec">
|
||||
<xsl:param name="name"/>
|
||||
<xsl:param name="header-list" select="$boost.doxygen.headers"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user