Skip to content

Commit

Permalink
Fix HTML "Last Modified" link in the footer (#3653)
Browse files Browse the repository at this point in the history
Add "peps/" to the URL.
  • Loading branch information
vstinner authored Feb 9, 2024
1 parent 1513503 commit 71308a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>")
Expand Down

0 comments on commit 71308a8

Please sign in to comment.