diff options
author | Georg Brandl <georg@python.org> | 2013-01-09 12:50:01 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-01-09 12:50:01 +0100 |
commit | b76f3937da3c2766ef667125cb0ec67652a4960e (patch) | |
tree | bdd0469a53aa057e041aff5dc575fde90b49c082 /tests/test_examplefiles.py | |
parent | bd51b3c608b6cd7601fc0227a65185632fb94568 (diff) | |
parent | d61e25e529a78887c8364126f7f73a2e6651a1e6 (diff) | |
download | pygments-b76f3937da3c2766ef667125cb0ec67652a4960e.tar.gz |
Merged in gentoo90/pygments-main (pull request #124: Add RPM *.spec files lexer)
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index 41acf4ef..d785cf3b 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -3,7 +3,7 @@ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -58,6 +58,8 @@ def check_lexer(lx, absfn, outfn): text = text.strip(b('\n')) + b('\n') try: text = text.decode('utf-8') + if text.startswith(u'\ufeff'): + text = text[len(u'\ufeff'):] except UnicodeError: text = text.decode('latin1') ntext = [] |