Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: /
Date: Fri, 28 Feb 2020 07:17:29
Message-Id: 1582874180.da089b016625ed6f9df3b122c1d972748f5cdb85.ulm@gentoo
1 commit: da089b016625ed6f9df3b122c1d972748f5cdb85
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 25 16:23:46 2020 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 28 07:16:20 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=da089b01
7
8 devbook.xsl: Suppress // in URIs with literal ## fragments.
9
10 Handle the slash in the same way as for other types of URIs.
11
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 devbook.xsl | 5 ++++-
15 1 file changed, 4 insertions(+), 1 deletion(-)
16
17 diff --git a/devbook.xsl b/devbook.xsl
18 index 31c73d4..e3bb38d 100644
19 --- a/devbook.xsl
20 +++ b/devbook.xsl
21 @@ -301,7 +301,10 @@
22 </xsl:variable>
23 <xsl:choose>
24 <xsl:when test="contains(@link, '##')">
25 - <a class="{$class}" href="{concat($relative_path_depth_recursion, substring-after(substring-before(@link, '##'), '::'), '/index.html#', substring-after(@link, '##'))}"><xsl:value-of select="."/></a>
26 + <xsl:variable name="slash">
27 + <xsl:if test="substring(substring-before(@link, '##'), string-length(substring-before(@link, '##'))) != '/'">/</xsl:if>
28 + </xsl:variable>
29 + <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>
30 </xsl:when>
31 <xsl:when test="contains(@link, '#')">
32 <xsl:variable name="anchor">