commit: 3d9337265a479f4025207348138877d844a9d943 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Wed Jan 15 20:04:15 2020 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Thu Jan 16 18:49:08 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3d933726
devbook.xsl: Fix links to eclass references. Closes: https://bugs.gentoo.org/442194 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> devbook.xsl | 6 ++++++ 1 file changed, 6 insertions(+) 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>
