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

[3.11] gh-97607: Fix content parsing in the impl-detail reST directive (GH-97652) #97723

Merged
merged 1 commit into from
Oct 2, 2022

Conversation

miss-islington
Copy link
Contributor

  • Don't parse content as arg in the impl-detail directive

This does not change the (untranslated) output,
but ensures that the doctree node metadata is correct.
which fixes gh-97607 with the text not being translated.
It also simplifies the code and logic
and makes it consistant with the docutils built-in directives.

  • Remove unused branch from impl-detail directive handling no-content case

This is not used anywhere in the docs and lacks a clear use case,
and is more likely a mistake which is now flagged at build time.
This simplifies the logic from two code paths to one,
and makes the behavior consistant with similar built-in directives
(e.g. the various admonition types).

  • Further simplify impl-detail reST directive code
    (cherry picked from commit e8165d4)

Co-authored-by: C.A.M. Gerlach CAM.Gerlach@Gerlach.CAM

…pythonGH-97652)

* Don't parse content as arg in the impl-detail directive

This does not change the (untranslated) output,
but ensures that the doctree node metadata is correct.
which fixes pythongh-97607 with the text not being translated.
It also simplifies the code and logic
and makes it consistant with the docutils built-in directives.

* Remove unused branch from impl-detail directive handling no-content case

This is not used anywhere in the docs and lacks a clear use case,
and is more likely a mistake which is now flagged at build time.
This simplifies the logic from two code paths to one,
and makes the behavior consistant with similar built-in directives
(e.g. the various admonition types).

* Further simplify impl-detail reST directive code
(cherry picked from commit e8165d4)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅.

@miss-islington miss-islington merged commit 8c528ef into python:3.11 Oct 2, 2022
@miss-islington miss-islington deleted the backport-e8165d4-3.11 branch October 2, 2022 05:28
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅.

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.

4 participants