Fix HTML "Last Modified" link in the footer (#3653)

Add "peps/" to the URL.
This commit is contained in:
Victor Stinner 2024-02-09 16:06:51 +01:00 committed by GitHub
parent 15135035de
commit 71308a8cab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ def _add_commit_history_info(pep_source_path: Path) -> nodes.paragraph:
except KeyError:
return nodes.paragraph()
commit_link = f"https://github.com/python/peps/commits/main/{pep_source_path.name}"
commit_link = f"https://github.com/python/peps/commits/main/peps/{pep_source_path.name}"
link_node = nodes.reference("", f"{iso_time} GMT", refuri=commit_link)
return nodes.paragraph("", "Last modified: ", link_node)

View File

@ -16,7 +16,7 @@ def test_add_commit_history_info():
assert str(out).startswith(
"<paragraph>Last modified: "
'<reference refuri="https://github.com/python/peps/commits/main/pep-0008.rst">'
'<reference refuri="https://github.com/python/peps/commits/main/peps/pep-0008.rst">'
)
# A variable timestamp comes next, don't test that
assert str(out).endswith("</reference></paragraph>")