Commit 1f1411e1 authored by bperraud's avatar bperraud

fix bugs with headers/toc

parent af314464
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
<xsl:template match="h6"> <xsl:template match="h6">
<xsl:variable name="level" select="count(ancestor::section) + 2"/> <xsl:variable name="level" select="count(ancestor::section) + 2"/>
<xsl:element name="h{$level}"> <xsl:element name="h{$level}">
<xsl:attribute name="id">
<xsl:value-of select="concat('h', $level, '-')"/>
<xsl:number level="any"/>
</xsl:attribute>
<xsl:value-of select="."/> <xsl:value-of select="."/>
</xsl:element> </xsl:element>
</xsl:template> </xsl:template>
......
...@@ -104,16 +104,6 @@ ...@@ -104,16 +104,6 @@
</ul> </ul>
</xsl:if> </xsl:if>
<!-- <li><a href="#">Introduction</a><span>1</span></li> -->
<!-- <li class="nested"> -->
<!-- <ul class="inner"> -->
<!-- <li><a href="#">Header 1</a><span>2</span> -->
<!-- </li> -->
<!-- <li><a href="#">Header 2</a><span>2</span> -->
<!-- </li> -->
<!-- </ul> -->
<!-- </li> -->
<!-- <li><a href="#">Header 2</a><span>3</span></li> -->
</xsl:template> </xsl:template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment