Set low priority for rm-ing refs section so refs still resolve correctly (#2227)

This commit is contained in:
CAM Gerlach 2022-01-11 19:45:43 -05:00 committed by GitHub
parent 88c14e061d
commit c33b7248c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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'])