]> 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:28:54 +0000 (22:28 -0700)
committerPablo Galindo <pablogsal@gmail.com>
Sat, 22 Oct 2022 19:05:47 +0000 (20:05 +0100)
commiteb5cdf6246b14f7e322b4c1fb5f91971e3082939
tree29390c61db95d4c7318a38a0dc05409f40afb155
parent1067baf54be97f907ffc73b94780c19eea1199ef
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