Set low priority for rm-ing refs section so refs still resolve correctly (#2227)
This commit is contained in:
parent
88c14e061d
commit
c33b7248c1
|
@ -438,8 +438,8 @@ class PEPHeaders(Transform):
|
||||||
class PEPFooter(Transform):
|
class PEPFooter(Transform):
|
||||||
"""Remove the References section if it is empty when rendered."""
|
"""Remove the References section if it is empty when rendered."""
|
||||||
|
|
||||||
# Uses same priority as docutils.transforms.TargetNotes
|
# Set low priority so ref targets aren't removed before they are needed
|
||||||
default_priority = 520
|
default_priority = 999
|
||||||
|
|
||||||
def apply(self):
|
def apply(self):
|
||||||
pep_source_path = Path(self.document['source'])
|
pep_source_path = Path(self.document['source'])
|
||||||
|
|
Loading…
Reference in New Issue