summaryrefslogtreecommitdiff
path: root/pyparsing.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyparsing.py')
-rw-r--r--pyparsing.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pyparsing.py b/pyparsing.py
index 59735a0..44773be 100644
--- a/pyparsing.py
+++ b/pyparsing.py
@@ -94,7 +94,7 @@ classes inherit from. Use the docstrings for examples of how to:
"""
__version__ = "2.3.1"
-__versionTime__ = "21 Dec 2018 06:14 UTC"
+__versionTime__ = "22 Dec 2018 15:31 UTC"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string
@@ -2449,7 +2449,8 @@ class ParserElement(object):
out = ['\n'.join(comments), t]
comments = []
try:
- t = t.replace(r'\n','\n')
+ # convert newline marks to actual newlines, and strip leading BOM if present
+ t = t.replace(r'\n','\n').lstrip('\ufeff')
result = self.parseString(t, parseAll=parseAll)
out.append(result.dump(full=fullDump))
success = success and not failureTests