From nobody Thu May 2 01:36:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603717232; cv=none; d=zohomail.com; s=zohoarc; b=N/4adJDGa5KBotyzmXWCPu0VPrAr+fM0gvhex37KKzCzlCoduKYqzHWwcEpHi3YoV7EETVfeEehmu6Frnw/Ex61eX83EtWrKjpjcYirJeOqG5x+hd3Pw2DSu66SIebkkdjWOaShPJOwgpEBnz7pYMenb1JiZXpoE/yqcE/aHDW4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603717232; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=7Ne1KtWi8HLfMmPIGjvjraHN56RjqnRZ7rLBVi7GnpY=; b=KyABzrdJ9rpWZLl7zwpfS7qdbtVEvIxA3GkC8AaTJD7K03A4z81e6hnRY8T2koAEfWYSpQ/9RYNEc5xRr5KwQkAZyZZJ8FbRun81HVBDsZCfqIJeCYukrIP+1tgYXAouCQkXdwhjAyAymjWbDU3mTvjhA6cWdHFniNNEPzxcA/s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603717232638385.580730768056; Mon, 26 Oct 2020 06:00:32 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-266-95BLf5CBPVaVl4YmNfZ5KA-1; Mon, 26 Oct 2020 09:00:26 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 821FE10866A6; Mon, 26 Oct 2020 13:00:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 114365D9E4; Mon, 26 Oct 2020 13:00:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 77D82183D021; Mon, 26 Oct 2020 13:00:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09QCpxIJ028675 for ; Mon, 26 Oct 2020 08:51:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1D4E25B4B1; Mon, 26 Oct 2020 12:51:59 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 738F45B4AF for ; Mon, 26 Oct 2020 12:51:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603717229; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7Ne1KtWi8HLfMmPIGjvjraHN56RjqnRZ7rLBVi7GnpY=; b=fQNMDijXeOCxAYdAosrivvObv1S68qzjc6DChDN9LlqngE2lC95+xZDCNGXPz4iFZ5n4O1 diQhFTukEJy5W1TT0KbuC3+uKE7LC39ZUyl7Zf7taPLGRfd2dq8tPHD4TIeZ6JxywT0JYU PPjh9Ww3uza5smRgYKp1ZUrhP2lxCR8= X-MC-Unique: 95BLf5CBPVaVl4YmNfZ5KA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] docs: page.xsl: Improve generation of paragraph anchor links Date: Mon, 26 Oct 2020 13:51:53 +0100 Message-Id: <6b1c26b43797899b8f8a3305d4e583cc39a661e6.1603716632.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use the 'parent' axis to check whether the parent is a div with class=3D'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 --- Note that whether or not to add table of contents to hacking.rst is out of scope of this patch. docs/page.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ - + --=20 2.26.2