You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2022/09/24 19:12:51 UTC
[jmeter] branch master updated: doc: handle markup in documentation
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new f4e43daa4f doc: handle <issue> markup in documentation
f4e43daa4f is described below
commit f4e43daa4f96cd5a2feaba11e6d55943d8b9690c
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Sat Sep 24 18:45:26 2022 +0300
doc: handle <issue> markup in documentation
---
xdocs/stylesheets/website-style.xsl | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/xdocs/stylesheets/website-style.xsl b/xdocs/stylesheets/website-style.xsl
index 7cc1933900..445d5810ab 100644
--- a/xdocs/stylesheets/website-style.xsl
+++ b/xdocs/stylesheets/website-style.xsl
@@ -552,7 +552,7 @@
Bug
<xsl:value-of select="./text()" />
</a>
- -
+ <xsl:call-template name="issue_separator"/>
</xsl:template>
<xsl:template match="rfc">
@@ -566,23 +566,27 @@
</xsl:choose>
</xsl:template>
- <xsl:template match="pr[following-sibling::pr or following-sibling::bug]">
+ <xsl:template match="pr">
<a href="https://github.com/apache/jmeter/pull/{./text()}">
Pull request #<xsl:value-of select="./text()" />
- </a>,
+ </a>
+ <xsl:call-template name="issue_separator"/>
</xsl:template>
- <xsl:template match="pr[not(following-sibling::pr) and (not(preceding-sibling::*) or preceding-sibling::bug or preceding-sibling::pr)]">
- <a href="https://github.com/apache/jmeter/pull/{./text()}">
- Pull request #<xsl:value-of select="./text()" />
+ <xsl:template match="issue">
+ <a href="https://github.com/apache/jmeter/issues/{./text()}">
+ Issue #<xsl:value-of select="./text()" />
</a>
- -
+ <xsl:call-template name="issue_separator"/>
</xsl:template>
- <xsl:template match="pr">
- <a href="https://github.com/apache/jmeter/pull/{./text()}">
- Pull request #<xsl:value-of select="./text()" />
- </a>
+ <xsl:template name="issue_separator">
+ <xsl:choose>
+ <xsl:when test="following-sibling::issue or following-sibling::pr or following-sibling::bug">, </xsl:when>
+ <!-- If preceding element is text, then avoid adding "," or "-". It looks like inline reference to an issue, PR -->
+ <xsl:when test="preceding-sibling::text()[normalize-space() != '']"/>
+ <xsl:otherwise> – </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="links">