8000 Turn off the inliner for PEP and RST references · python/peps@fe00d69 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe00d69

Browse files
committed
Turn off the inliner for PEP and RST references
1 parent ce86a63 commit fe00d69

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

pep_sphinx_extensions/__init__.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,8 @@
1919
from sphinx.application import Sphinx
2020

2121
# Monkeypatch sphinx.environment.default_settings as Sphinx doesn't allow custom settings or Readers
22-
# These settings should go in docutils.conf, but are overridden here for now so as not to affect
23-
# pep2html.py
24-
environment.default_settings |= {
25-
"pep_references": True,
26-
"rfc_references": True,
27-
"pep_base_url": "",
28-
"pep_file_url_template": "",
29-
"_disable_config": True, # disable using docutils.conf whilst running both PEP generators
30-
}
31-
32-
# TODO replace all inlined PEP and RFC strings with marked-up roles, disable pep_references and rfc_references and remove this monkey-patch
33-
states.Inliner.pep_reference = lambda s, m, _l: [nodes.reference("", m.group(0), refuri=s.document.settings.pep_url.format(int(m.group("pepnum2"))))]
22+
# This disables reading configuration from docutils.conf so as not to affect pep2html.py
23+
environment.default_settings["_disable_config"] = True
3424

3525

3626
def _depart_maths():

0 commit comments

Comments
 (0)
0