◐ Shell
clean mode source ↗

gh-97607: Fix content parsing in the impl-detail reST directive by CAM-Gerlach · Pull Request #97652 · python/cpython

added 2 commits

September 29, 2022 14:13
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.
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).

AA-Turner

ezio-melotti

@CAM-Gerlach

This was referenced

Sep 30, 2022

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Oct 2, 2022
…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 pushed a commit to miss-islington/cpython that referenced this pull request

Oct 2, 2022
…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 added a commit that referenced this pull request

Oct 2, 2022
…7652)

* 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>

miss-islington added a commit that referenced this pull request

Oct 2, 2022
…7652)

* 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>

serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request

Oct 2, 2022
…python#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

carljm added a commit to carljm/cpython that referenced this pull request

Oct 3, 2022

pablogsal pushed a commit that referenced this pull request

Oct 22, 2022
…7652)

* 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>