mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
encode source code for parsing only on python 2.x
This commit is contained in:
parent
918a509efc
commit
23ef216a15
@ -156,7 +156,7 @@ class PygmentsBridge(object):
|
||||
if sys.version_info >= (2, 5):
|
||||
src = 'from __future__ import with_statement\n' + src
|
||||
|
||||
if isinstance(src, unicode):
|
||||
if sys.version_info < (3, 0) and isinstance(src, unicode):
|
||||
# Non-ASCII chars will only occur in string literals
|
||||
# and comments. If we wanted to give them to the parser
|
||||
# correctly, we'd have to find out the correct source
|
||||
|
Loading…
Reference in New Issue
Block a user