Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions pep_sphinx_extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
from sphinx.application import Sphinx


def _depart_maths():
pass # No-op callable for the type checker


def _update_config_for_builder(app: Sphinx) -> None:
app.env.document_ids = {} # For PEPReferenceRoleTitleText
app.env.settings["builder"] = app.builder.name
Expand Down Expand Up @@ -84,8 +80,8 @@ def setup(app: Sphinx) -> dict[str, bool]:
app.connect("env-before-read-docs", create_pep_zero) # PEP 0 hook

# Mathematics rendering
inline_maths = HTMLTranslator.visit_math, _depart_maths
block_maths = HTMLTranslator.visit_math_block, _depart_maths
inline_maths = HTMLTranslator.visit_math, None
block_maths = HTMLTranslator.visit_math_block, None
app.add_html_math_renderer("maths_to_html", inline_maths, block_maths) # Render maths to HTML

# Parallel safety: https://www.sphinx-doc.org/en/master/extdev/index.html#extension-metadata
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pygments >= 2.9.0
# Sphinx 6.1.0 broke copying images in parallel builds; fixed in 6.1.2
# See https://github.com/sphinx-doc/sphinx/pull/11100
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1, < 7.3
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1
docutils >= 0.19.0

sphinx-autobuild
Expand Down