From c33b7248c18e7eebc015f4f8075e6c7933ed8602 Mon Sep 17 00:00:00 2001 From: CAM Gerlach Date: Tue, 11 Jan 2022 19:45:43 -0500 Subject: [PATCH] Set low priority for rm-ing refs section so refs still resolve correctly (#2227) --- pep2html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pep2html.py b/pep2html.py index 24b7c16fe..1a6443bde 100755 --- a/pep2html.py +++ b/pep2html.py @@ -438,8 +438,8 @@ class PEPHeaders(Transform): class PEPFooter(Transform): """Remove the References section if it is empty when rendered.""" - # Uses same priority as docutils.transforms.TargetNotes - default_priority = 520 + # Set low priority so ref targets aren't removed before they are needed + default_priority = 999 def apply(self): pep_source_path = Path(self.document['source'])