Only select 3.x versions.

This commit is contained in:
Georg Brandl 2012-10-28 18:12:06 +01:00
parent 2b2bb4122d
commit f30ef68167

View File

@ -143,8 +143,8 @@ class PygmentsBridge(object):
# just replace all non-ASCII characters.
src = src.encode('ascii', 'replace')
if sys.version_info < (3, 2):
# Python 3.1 can't proceess '\r' as linesep.
if (3, 0) <= sys.version_info < (3, 2):
# Python 3.1 can't process '\r' as linesep.
# `parser.suite("print('hello')\r\n")` cause error.
if '\r\n' in src:
src = src.replace('\r\n', '\n')