aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-01-15 21:04:15 +0100
committerUlrich Müller <ulm@gentoo.org>2020-01-16 19:49:08 +0100
commit3d9337265a479f4025207348138877d844a9d943 (patch)
tree7c3775c846a38a61de4ed9f61ca6828631de86b5 /devbook.xsl
parentdevbook-guide: Drop redundant subsection levels. (diff)
downloaddevmanual-3d9337265a479f4025207348138877d844a9d943.tar.gz
devmanual-3d9337265a479f4025207348138877d844a9d943.tar.bz2
devmanual-3d9337265a479f4025207348138877d844a9d943.zip
devbook.xsl: Fix links to eclass references.
Closes: https://bugs.gentoo.org/442194 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'devbook.xsl')
-rw-r--r--devbook.xsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/devbook.xsl b/devbook.xsl
index a85d81c..19012ff 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -329,6 +329,12 @@
<xsl:when test=". != ''">
<a class="{$class}" href="{concat($relative_path_depth_recursion, substring-after(@link, '::'), $slash, 'index.html')}"><xsl:value-of select="."/></a>
</xsl:when>
+ <xsl:when test="starts-with(@link, '::eclass-reference/') and substring-after(@link, '::eclass-reference/') != ''">
+ <!-- Eclass reference pages are generated with man2html,
+ so there isn't any text.xml that could be loaded.
+ Use the name of the eclass as link text. #442194 -->
+ <a class="{$class}" href="{concat($relative_path_depth_recursion, substring-after(@link, '::'), $slash, 'index.html')}"><xsl:value-of select="substring-before(concat(substring-after(@link, '::eclass-reference/'), $slash), '/')"/></a>
+ </xsl:when>
<xsl:otherwise>
<a class="{$class}" href="{concat($relative_path_depth_recursion, substring-after(@link, '::'), $slash, 'index.html')}"><xsl:value-of select="document(concat(/guide/@self, $relative_path_depth_recursion, substring-after(@link, '::'), '/text.xml'))/guide/chapter[1]/title"/></a>
</xsl:otherwise>