Issue 14535: three code examples in docs are not syntax highlighted (original) (raw)

Issue14535

Created on 2012-04-09 14:27 by Ramchandra Apte, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
highlight-code.diff tshepang,2012-04-13 17:42 review
Messages (6)
msg157845 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-04-09 14:27
Three code examples in http://docs.python.org/py3k/library/multiprocessing.html#examples are not syntax highlighted.
msg158216 - (view) Author: Tshepang Lekhonkhobe (tshepang) * Date: 2012-04-13 17:42
This is probably because Sphinx can't detect that those are Python sources, so my patch forces it to recognize it as such.
msg158221 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-04-13 17:52
LGTM
msg158247 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-04-14 02:52
New changeset 635966f6d3de by Ezio Melotti in branch '3.2': #14535: fix code highlight in multiprocessing examples. Patch by Tshepang Lekhonkhobe. http://hg.python.org/cpython/rev/635966f6d3de New changeset 957e2c71beef by Ezio Melotti in branch 'default': #14535: merge with 3.2. http://hg.python.org/cpython/rev/957e2c71beef
msg158248 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-04-14 02:56
I tried the attached patch but it didn't work for me. Using "python3" instead of "python" seemed to fix the problem. I also updated another "python" to use "python3". Thanks for the report and the patch!
msg158250 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-04-14 06:40
Ezio: That's a "bug" in Sphinx; even when the language is selected explicitly as "python", it will try to parse the code. It is fixed in a later Sphinx version.
History
Date User Action Args
2022-04-11 14:57:28 admin set github: 58740
2012-04-14 06:40:06 georg.brandl set nosy: + georg.brandlmessages: +
2012-04-14 02:56:03 ezio.melotti set status: open -> closedtype: enhancementassignee: docs@python -> ezio.melottinosy: + ezio.melottimessages: + resolution: fixedstage: commit review -> resolved
2012-04-14 02:52:42 python-dev set nosy: + python-devmessages: +
2012-04-13 17:52:01 eric.araujo set nosy: + eric.araujomessages: + stage: commit review
2012-04-13 17:42:26 tshepang set files: + highlight-code.diffkeywords: + patchmessages: +
2012-04-13 17:22:03 tshepang set nosy: + tshepang
2012-04-09 14:27:44 Ramchandra Apte create