Skip to content

Commit

Permalink
Remove leading space from code snippets.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Dec 5, 2023
1 parent 75aabc1 commit 8e78c2f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions asio/src/doc/reference.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,20 @@


<xsl:template match="codeline" mode="codeline">
<xsl:variable name="code">
<xsl:apply-templates mode="codeline"/>
</xsl:variable>
<xsl:if test="string-length(.) &gt; 0">
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="position() = 1 and starts-with($code, ' ')">
<xsl:text> </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:apply-templates mode="codeline"/>
<xsl:value-of select="$code"/>
<xsl:value-of select="$newline"/>
</xsl:template>

Expand Down

0 comments on commit 8e78c2f

Please sign in to comment.