From: Peter Krempa Date: Mon, 26 Oct 2020 12:44:19 +0000 (+0100) Subject: docs: page.xsl: Improve generation of paragraph anchor links X-Git-Tag: v6.10.0-rc1~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9759291c535607df1191fe844d76582e6da2f0c;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Michal Privoznik --- diff --git a/docs/page.xsl b/docs/page.xsl index 36168305fa..07bfc52a4c 100644 --- a/docs/page.xsl +++ b/docs/page.xsl @@ -196,7 +196,7 @@ - +