Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-127833: Fix grammar snippet formatting for help() output #129692

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

encukou
Copy link
Member

@encukou encukou commented Feb 5, 2025

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/

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.
This is usually done at release time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant