]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-97607: Fix content parsing in the impl-detail reST directive (GH-97652)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 2 Oct 2022 05:27:56 +0000 (22:27 -0700)
committerGitHub <noreply@github.com>
Sun, 2 Oct 2022 05:27:56 +0000 (22:27 -0700)
commit5ee8344aa29d3ecbebcdb1fe32ac6bb5f5e2dda3
treeabf890136ba51babf1bf442f38371105c50e6466
parentc6fcbb4928ced97df81d2cef6c5dcec6bc7dcab7
gh-97607: Fix content parsing in the impl-detail reST directive (GH-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 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 e8165d47b852e933c176209ddc0b5836a9b0d5f4)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Doc/tools/extensions/pyspecific.py