gh-127833: Fix grammar snippet formatting for help() output by encukou · Pull Request #129692 · python/cpython
Change pydoc_data to show the "input" of grammar snippet
directives, which is formatted the way we want.
See also this Sphinx issue: sphinx-doc/sphinx#13302
And: sphinx-doc/sphinx#4454
A known issue is cross-grammar links, like those in
the string format specification mini-language, which render
as reST source:
element_index: `~python-grammar:digit`+ | `index_string`
I don't see a good way to fix this before Sphinx is refactored.
📚 Documentation preview 📚: https://cpython-previews--129692.org.readthedocs.build/