commit: da089b016625ed6f9df3b122c1d972748f5cdb85
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 25 16:23:46 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Feb 28 07:16:20 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=da089b01
devbook.xsl: Suppress // in URIs with literal ## fragments.
Handle the slash in the same way as for other types of URIs.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
devbook.xsl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/devbook.xsl b/devbook.xsl
index 31c73d4..e3bb38d 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -301,7 +301,10 @@
</xsl:variable>
<xsl:choose>
<xsl:when test="contains(@link, '##')">
- <a class="{$class}" href="{concat($relative_path_depth_recursion,
substring-after(substring-before(@link, '##'), '::'), '/index.html#',
substring-after(@link, '##'))}"><xsl:value-of select="."/></a>
+ <xsl:variable name="slash">
+ <xsl:if test="substring(substring-before(@link, '##'),
string-length(substring-before(@link, '##'))) != '/'">/</xsl:if>
+ </xsl:variable>
+ <a class="{$class}" href="{concat($relative_path_depth_recursion,
substring-after(substring-before(@link, '##'), '::'), $slash, 'index.html#',
substring-after(@link, '##'))}"><xsl:value-of select="."/></a>
</xsl:when>
<xsl:when test="contains(@link, '#')">
<xsl:variable name="anchor">