]> git.ipfire.org Git - thirdparty/libvirt.git/commit
docs: page.xsl: Improve generation of paragraph anchor links
authorPeter Krempa <pkrempa@redhat.com>
Mon, 26 Oct 2020 12:44:19 +0000 (13:44 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 2 Nov 2020 13:14:07 +0000 (14:14 +0100)
commitb9759291c535607df1191fe844d76582e6da2f0c
tree30cdfb0bfdb3433a995fa150ac0aa8f527b412d9
parente9b434efdec20a59317ef969093587abd2f353f5
docs: page.xsl: Improve generation of paragraph anchor links

Use the 'parent' axis to check whether the parent is a div with
class='section' rather than looking for 'toc-backref' anchor to see
whether to generate one of the headerlink alternatives. Both hare
docutils-specific thus apply to docs generated from RST documents.

This adds the links for pages generated from RST documents which don't
have a table of contents (and thus lack the 'toc-backref' anchors) and
thus fixes pages such as hacking.html and news.html to have reasonable
links which can be shared.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/page.xsl