8000 Infra: Fix hiding of References if it contains invisible SystemMessage by CAM-Gerlach · Pull Request #3083 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

Infra: Fix hiding of References if it contains invisible SystemMessage #3083

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 c 8000 ommunity.

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

Merged

Conversation

CAM-Gerlach
Copy link
Member
@CAM-Gerlach CAM-Gerlach commented Apr 1, 2023

As originally discovered reviewing PEP 710 (PEP-710) in PR #3076 , the References section does not get hidden as intended if its doctree contains nodes of type system_message, which are invisible docutils messages hidden in the rendered output (and thus not adding any visible content to the section). This can happen if the References section contains any hyperlink target labels that have the same name as the implicit targets generated for each section heading (i.e. the name of the section). This isn't a real issue, particularly since both we and Sphinx discourage using these implict section heading links for multiple reasons anyway, but we should still properly hide the References section in cases like these.

Therefore, we just add nodes.system_message to the list of "invisible" node types that prompt hiding this section.


📚 Documentation preview 📚: https://pep-previews--3083.org.readthedocs.build/

@CAM-Gerlach CAM-Gerlach added bug infra Core infrastructure for building and rendering PEPs labels Apr 1, 2023
@CAM-Gerlach CAM-Gerlach requested a review from hugovk April 1, 2023 18:58
@CAM-Gerlach CAM-Gerlach self-assigned this Apr 1, 2023
@CAM-Gerlach CAM-Gerlach requested a review from AA-Turner as a code owner April 1, 2023 18:58
@CAM-Gerlach CAM-Gerlach changed the title Infra: Fix not hiding References if it contains invisible SystemMessage Infra: Fix hiding of References if it contains invisible SystemMessage Apr 1, 2023
@ambv ambv merged commit 4b3c950 into python:main Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug infra Core infrastructure for building and rendering PEPs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0