Skip to content

Commit

Permalink
Ensure the :pep: role works properly with the dirhtml builder (#3322
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AA-Turner authored Sep 1, 2023
1 parent 43a28ef commit dbe0dd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pep_sphinx_extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _update_config_for_builder(app: Sphinx) -> None:
app.env.document_ids = {} # For PEPReferenceRoleTitleText
app.env.settings["builder"] = app.builder.name
if app.builder.name == "dirhtml":
app.env.settings["pep_url"] = "pep-{:0>4}"
app.env.settings["pep_url"] = "pep-{:0>4}/"

app.connect("build-finished", _post_build) # Post-build tasks

Expand Down
2 changes: 1 addition & 1 deletion pep_sphinx_extensions/pep_zero_generator/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def write_pep0(
target = (
f"topic/{subindex}.html"
if builder == "html"
else f"../topic/{subindex}"
else f"../topic/{subindex}/"
)
self.emit_text(f"* `{subindex.title()} PEPs <{target}>`_")
self.emit_newline()
Expand Down

0 comments on commit dbe0dd8

Please sign in to comment.