diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-02-17 00:46:54 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-02-17 01:07:18 +0900 |
commit | 423bf7b5e3ab744ea32b8c929a81a4e6a11db95a (patch) | |
tree | 5db680e4a7a39fcb521e965c39a9e9733ce45c97 /sphinx/highlighting.py | |
parent | 881e086e506d029cc62619ceeabea845cbb1855f (diff) | |
download | sphinx-git-423bf7b5e3ab744ea32b8c929a81a4e6a11db95a.tar.gz |
Fix code-block literals raises highlighting warnings by default
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r-- | sphinx/highlighting.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 37efdc887..40c83260e 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -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': |