Fix code-block literals raises highlighting warnings by default

This commit is contained in:
Takeshi KOMIYA 2016-02-17 00:46:54 +09:00
parent 881e086e50
commit 423bf7b5e3
3 changed files with 9 additions and 8 deletions

View File

@ -12,6 +12,7 @@ Features added
Bugs fixed
----------
* Remove ``image/gif`` from supported_image_types of LaTeX writer (#2272)
* Fix code-block literals raises highlighting warnings by default
Documentation
-------------

View File

@ -144,17 +144,17 @@ class PygmentsBridge(object):
if source.startswith('>>>'):
# interactive session
lexer = lexers['pycon']
elif not force:
# maybe Python -- try parsing it
if self.try_parse(source):
lexer = lexers['python']
else:
lexer = lexers['none']
else:
lexer = lexers['python']
elif lang in ('py3', 'python3'):
if source.startswith('>>>'):
lexer = lexers['pycon3']
elif not force:
# maybe Python -- try parsing it
if self.try_parse(source):
lexer = lexers['python3']
else:
lexer = lexers['none']
else:
lexer = lexers['python3']
elif lang == 'guess':

View File

@ -81,8 +81,8 @@ HTML_XPATH = {
(".//pre", u'Max Strauß'),
(".//a[@href='_downloads/img.png']", ''),
(".//a[@href='_downloads/img1.png']", ''),
(".//pre", u'"quotes"'),
(".//pre", u"'included'"),
(".//pre/span", u'"quotes"'),
(".//pre/span", u"'included'"),
(".//pre/span[@class='s2']", u'üöä'),
(".//div[@class='inc-pyobj1 highlight-text']//pre",
r'^class Foo:\n pass\n\s*$'),