diff options
author | 2023-11-23 18:20:50 +0100 | |
---|---|---|
committer | 2023-11-23 18:20:50 +0100 | |
commit | 4282d691001af8b08765a71f50ddb7e32a93f8a4 (patch) | |
tree | 051b1379fc1afc244e71fa130dacdf9e8fc51edb | |
parent | lang.highlight.ebuild.xsl: Collect shell commands in a variable (diff) | |
download | devmanual-4282d691001af8b08765a71f50ddb7e32a93f8a4.tar.gz devmanual-4282d691001af8b08765a71f50ddb7e32a93f8a4.tar.bz2 devmanual-4282d691001af8b08765a71f50ddb7e32a93f8a4.zip |
devbook.xsl: Use same test for eclass pages everywhere
Drop relative_path_depth variable which is no longer used.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | devbook.xsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/devbook.xsl b/devbook.xsl index b50ecc5..322e267 100644 --- a/devbook.xsl +++ b/devbook.xsl @@ -510,11 +510,10 @@ </xsl:template> <xsl:template match="/"> - <xsl:variable name="relative_path_depth" - select="string-length(/guide/@self) - string-length(translate(/guide/@self, '/' , ''))"/> <xsl:variable name="relative_path_depth_recursion"> <xsl:call-template name="repeat-string"> - <xsl:with-param name="count" select="$relative_path_depth"/> + <xsl:with-param name="count" select="string-length(/guide/@self) + - string-length(translate(/guide/@self, '/' , ''))"/> <xsl:with-param name="append">../</xsl:with-param> </xsl:call-template> </xsl:variable> @@ -715,7 +714,8 @@ The text of this document is distributed under the <xsl:choose> <!-- Eclasses are GPL-2, so we need a different footer --> - <xsl:when test="starts-with(/guide/@self, 'eclass-reference/') and $relative_path_depth >= 2"> + <xsl:when test="starts-with(/guide/@self, 'eclass-reference/') + and substring-after(/guide/@self, '/') != ''"> <a href="https://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License, version 2</a>. </xsl:when> <xsl:otherwise> |