Skip to content

Commit 71308a8

Browse files
authored
Fix HTML "Last Modified" link in the footer (python#3653)
Add "peps/" to the URL.
1 parent 1513503 commit 71308a8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pep_sphinx_extensions/pep_processor/transforms/pep_footer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _add_commit_history_info(pep_source_path: Path) -> nodes.paragraph:
6666
except KeyError:
6767
return nodes.paragraph()
6868

69-
commit_link = f"https://github.com/python/peps/commits/main/{pep_source_path.name}"
69+
commit_link = f"https://github.com/python/peps/commits/main/peps/{pep_source_path.name}"
7070
link_node = nodes.reference("", f"{iso_time} GMT", refuri=commit_link)
7171
return nodes.paragraph("", "Last modified: ", link_node)
7272

pep_sphinx_extensions/tests/pep_processor/transform/test_pep_footer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_add_commit_history_info():
1616

1717
assert str(out).startswith(
1818
"<paragraph>Last modified: "
19-
'<reference refuri="https://github.com/python/peps/commits/main/pep-0008.rst">'
19+
'<reference refuri="https://github.com/python/peps/commits/main/peps/pep-0008.rst">'
2020
)
2121
# A variable timestamp comes next, don't test that
2222
assert str(out).endswith("</reference></paragraph>")

0 commit comments

Comments
 (0)