mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-11 13:23:59 +00:00
template.xsl: Do proper highlighting for default template arguments
[SVN r19859]
This commit is contained in:
parent
52653f365c
commit
96ec5bc0f3
@ -339,7 +339,7 @@
|
|||||||
<xsl:when test="$highlight">
|
<xsl:when test="$highlight">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="$parameter/default/*|$parameter/default/text()"
|
select="$parameter/default/*|$parameter/default/text()"
|
||||||
mode="annotation"/>
|
mode="highlight"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="string($parameter/default)"/>
|
<xsl:value-of select="string($parameter/default)"/>
|
||||||
@ -389,24 +389,20 @@
|
|||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:variable name="def">
|
<xsl:variable name="def">
|
||||||
<xsl:if test="$parameter/default">
|
<xsl:value-of select="string($parameter/default)"/>
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$highlight">
|
|
||||||
<xsl:apply-templates
|
|
||||||
select="$parameter/default/*|$parameter/default/text()"
|
|
||||||
mode="annotation"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="string($parameter/default)"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:if test="not($def='')">
|
<xsl:if test="not($def='')">
|
||||||
<xsl:text> = </xsl:text>
|
<xsl:text> = </xsl:text>
|
||||||
|
|
||||||
<xsl:copy-of select="$def"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:apply-templates select="$parameter/default/*" mode="highlight"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$def"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
<!-- If this is the last parameter, add an extra space to
|
<!-- If this is the last parameter, add an extra space to
|
||||||
avoid printing >> -->
|
avoid printing >> -->
|
||||||
@ -422,8 +418,11 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="specialization">
|
<xsl:template match="specialization">
|
||||||
|
<xsl:param name="highlight" select="true()"/>
|
||||||
<xsl:text><</xsl:text>
|
<xsl:text><</xsl:text>
|
||||||
<xsl:apply-templates select="template-arg"/>
|
<xsl:apply-templates select="template-arg">
|
||||||
|
<xsl:with-param name="highlight" select="$highlight"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
<xsl:text>></xsl:text>
|
<xsl:text>></xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
@ -431,7 +430,7 @@
|
|||||||
<xsl:if test="position() > 1">
|
<xsl:if test="position() > 1">
|
||||||
<xsl:text>, </xsl:text>
|
<xsl:text>, </xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates mode="annotation"/>
|
<xsl:apply-templates mode="highlight"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user