mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Don't highlight a full declaration if the template header was placed on a
separate line. [SVN r19061]
This commit is contained in:
parent
d9d5f69a7e
commit
d1ab30b7f1
@ -19,7 +19,7 @@
|
|||||||
and any storage specifiers is greater than this length, they will be
|
and any storage specifiers is greater than this length, they will be
|
||||||
placed on a separate line from the function name and parameters
|
placed on a separate line from the function name and parameters
|
||||||
unless everything fits on a single line. -->
|
unless everything fits on a single line. -->
|
||||||
<xsl:param name="boost.short.result.type">6</xsl:param>
|
<xsl:param name="boost.short.result.type">12</xsl:param>
|
||||||
|
|
||||||
<!-- Display a function declaration -->
|
<!-- Display a function declaration -->
|
||||||
<xsl:template name="function">
|
<xsl:template name="function">
|
||||||
@ -192,18 +192,18 @@
|
|||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
<!-- Check if we can put the entire declaration on a single line -->
|
<!-- Check if we can put the entire declaration on a single line, and
|
||||||
<xsl:when test="not($end-column > $max-columns)">
|
the entire line will be a link.-->
|
||||||
|
<xsl:when test="not($end-column > $max-columns)
|
||||||
|
and not($suppress-template)">
|
||||||
<xsl:call-template name="link-or-anchor">
|
<xsl:call-template name="link-or-anchor">
|
||||||
<xsl:with-param name="to" select="$link-to"/>
|
<xsl:with-param name="to" select="$link-to"/>
|
||||||
<xsl:with-param name="text">
|
<xsl:with-param name="text">
|
||||||
<xsl:if test="not($suppress-template)">
|
<xsl:apply-templates select="template" mode="synopsis">
|
||||||
<xsl:apply-templates select="template" mode="synopsis">
|
<xsl:with-param name="indentation" select="$indentation"/>
|
||||||
<xsl:with-param name="indentation" select="$indentation"/>
|
<xsl:with-param name="wrap" select="false()"/>
|
||||||
<xsl:with-param name="wrap" select="false()"/>
|
<xsl:with-param name="highlight" select="false()"/>
|
||||||
<xsl:with-param name="highlight" select="false()"/>
|
</xsl:apply-templates>
|
||||||
</xsl:apply-templates>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:value-of select="$type"/>
|
<xsl:value-of select="$type"/>
|
||||||
<xsl:value-of select="$function-name"/>
|
<xsl:value-of select="$function-name"/>
|
||||||
<xsl:text>(</xsl:text>
|
<xsl:text>(</xsl:text>
|
||||||
@ -223,6 +223,44 @@
|
|||||||
<xsl:text>;</xsl:text>
|
<xsl:text>;</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- Check if we can put the entire declaration on a single
|
||||||
|
line, but only highlight the name. -->
|
||||||
|
<xsl:when test="not($end-column > $max-columns)">
|
||||||
|
<xsl:if test="not($suppress-template)">
|
||||||
|
<xsl:apply-templates select="template" mode="synopsis">
|
||||||
|
<xsl:with-param name="indentation" select="$indentation"/>
|
||||||
|
<xsl:with-param name="wrap" select="false()"/>
|
||||||
|
<xsl:with-param name="highlight" select="false()"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<xsl:call-template name="source-highlight">
|
||||||
|
<xsl:with-param name="text" select="$type"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
|
<xsl:call-template name="link-or-anchor">
|
||||||
|
<xsl:with-param name="to" select="$link-to"/>
|
||||||
|
<xsl:with-param name="text" select="$function-name"/>
|
||||||
|
<xsl:with-param name="link-type" select="$link-type"/>
|
||||||
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
|
<xsl:text>(</xsl:text>
|
||||||
|
<xsl:call-template name="function-parameters">
|
||||||
|
<xsl:with-param name="include-names" select="$include-names"/>
|
||||||
|
<xsl:with-param name="indentation"
|
||||||
|
select="$indentation + $template-length + string-length($type)
|
||||||
|
+ string-length($function-name) + 1"/>
|
||||||
|
<xsl:with-param name="final" select="true()"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>)</xsl:text>
|
||||||
|
|
||||||
|
<xsl:call-template name="source-highlight">
|
||||||
|
<xsl:with-param name="text" select="$postdeclarator"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>;</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
<!-- This declaration will take multiple lines -->
|
<!-- This declaration will take multiple lines -->
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:call-template name="source-highlight">
|
<xsl:call-template name="source-highlight">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user