mirror of
https://github.com/python/cpython.git
synced 2025-08-18 15:51:23 +00:00
[3.12] Docs: Link tokens in the format string grammars (GH-108184) (#113839)
Docs: Link tokens in the format string grammars (GH-108184)
(cherry picked from commit f3d5d4aa8f
)
Co-authored-by: William Andrea <william.j.andrea@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
This commit is contained in:
parent
0b31a50ecd
commit
cd87737a1d
3 changed files with 12 additions and 8 deletions
|
@ -48,6 +48,11 @@ Body.enum.converters['loweralpha'] = \
|
|||
Body.enum.converters['lowerroman'] = \
|
||||
Body.enum.converters['upperroman'] = lambda x: None
|
||||
|
||||
# monkey-patch the productionlist directive to allow hyphens in group names
|
||||
# https://github.com/sphinx-doc/sphinx/issues/11854
|
||||
from sphinx.domains import std
|
||||
|
||||
std.token_re = re.compile(r'`((~?[\w-]*:)?\w+)`')
|
||||
|
||||
# Support for marking up and linking to bugs.python.org issues
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue