This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, georg.brandl
Date 2008-02-21.14:26:08
SpamBayes Score 0.001024659
Marked as misclassified No
Message-id <1203604005.4.0.314961213183.issue2154@psf.upfronthosting.co.za>
In-reply-to
Content
The new doc framework highlights python code, and looks very nice.
However, some snippets are not parseable by the compiler, and are thus
left unhighlighted. For example:
http://docs.python.org/dev/whatsnew/2.6.html#the-contextlib-module

The vast majority of misses is because of lines containing "...", which
is not a valid expression (except in slices).
The attached patch tries to recognize some common patterns, and replaces
"..." by some valid identifier; "... continue processing ..." is also
transformed. 

Note that the replacements are done only to get a better answer to "is
this block a python code"; pygment still works on the original string.

I checked that all new highlighted blocks are actually python snippets.
(actually, except one in configfile.rst; but others similar blocks on
the same page were already wrongly given to the python lexer)

The patch also corrects some easy syntax errors in samples.
History
Date User Action Args
2008-02-21 14:26:45amaury.forgeotdarcsetspambayes_score: 0.00102466 -> 0.001024659
recipients: + amaury.forgeotdarc, georg.brandl
2008-02-21 14:26:45amaury.forgeotdarcsetspambayes_score: 0.00102466 -> 0.00102466
messageid: <1203604005.4.0.314961213183.issue2154@psf.upfronthosting.co.za>
2008-02-21 14:26:09amaury.forgeotdarclinkissue2154 messages
2008-02-21 14:26:09amaury.forgeotdarccreate