]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: page.xsl: Fix headerlinks with new docutils
authorPeter Krempa <pkrempa@redhat.com>
Wed, 7 Feb 2024 15:54:22 +0000 (16:54 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 8 Feb 2024 15:48:46 +0000 (16:48 +0100)
New docutils generates a <section> element rather than a <div
class='section'> as it did before thus breaking our headerlink
generator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/page.xsl

index 1021899b3ad56b64b0f9b44215b437b127d4c2e6..04d7cc94328e5f549522e77fec20081afeb67da1 100644 (file)
       <xsl:if test="./html:a/@id">
         <a class="headerlink" href="#{html:a/@id}" title="Link to this headline">&#xb6;</a>
       </xsl:if>
+      <xsl:if test="parent::html:section">
+        <a class="headerlink" href="#{../@id}" title="Link to this headline">&#xb6;</a>
+      </xsl:if>
       <xsl:if test="parent::html:div[@class='section']">
         <a class="headerlink" href="#{../@id}" title="Link to this headline">&#xb6;</a>
       </xsl:if>