aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2021-03-10 00:08:23 +0100
committerUlrich Müller <ulm@gentoo.org>2021-03-10 00:08:23 +0100
commit7e83587c5a6d9b5b00b6882f828235bfa5e791d7 (patch)
tree9e44818899344fe2a4b4e6ece8202f2c55078d31 /devbook.xsl
parentdevbook.xsl: Specify line length for Emacs (diff)
downloaddevmanual-7e83587c5a6d9b5b00b6882f828235bfa5e791d7.tar.gz
devmanual-7e83587c5a6d9b5b00b6882f828235bfa5e791d7.tar.bz2
devmanual-7e83587c5a6d9b5b00b6882f828235bfa5e791d7.zip
devbook.xsl: Simplify section template
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'devbook.xsl')
-rw-r--r--devbook.xsl6
1 files changed, 2 insertions, 4 deletions
diff --git a/devbook.xsl b/devbook.xsl
index a3f7edb..fe93020 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -32,10 +32,8 @@
</xsl:template>
<xsl:template match="section|subsection|subsubsection">
- <xsl:variable name="level">
- <xsl:value-of select="number(starts-with(local-name(), 'sub'))
- + number(starts-with(local-name(), 'subsub')) + 2"/>
- </xsl:variable>
+ <xsl:variable name="level" select="2 + number(starts-with(local-name(), 'sub'))
+ + number(starts-with(local-name(), 'subsub'))"/>
<xsl:variable name="anchor">
<xsl:call-template name="convert-to-anchor">
<xsl:with-param name="data" select="title"/>