Skip to content

Commit 2d0a975

Browse files
Only set reftitle if there was one in the first place
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 40f0d60 commit 2d0a975

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎pep_sphinx_extensions/pep_processor/transforms/pep_references.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ def apply(self) -> None:
5555
if node.get("internal", True):
5656
continue
5757
reftitle = node.get("reftitle", "")
58-
node["reftitle"] = self.version_pattern.sub(r"(in \1)", reftitle)
58+
if reftitle:
59+
node["reftitle"] = self.version_pattern.sub(r"(in \1)", reftitle)

0 commit comments

Comments
 (0)