From fcbad044c73a0c4006edd34e5586d8a60774ddf4 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Sun, 29 Mar 2020 19:37:18 -0500 Subject: Fix potential FutureWarning with generated regex; minor reformat of runTests output to break at test comments if any --- pyparsing/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyparsing/util.py') diff --git a/pyparsing/util.py b/pyparsing/util.py index a80a6d3..0d5af76 100644 --- a/pyparsing/util.py +++ b/pyparsing/util.py @@ -43,7 +43,7 @@ def col(loc, strg): Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more - information on parsing strings containing ````\ s, and suggested + information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. """ @@ -57,7 +57,7 @@ def lineno(loc, strg): Note - the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` - for more information on parsing strings containing ````\ s, and + for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. """ @@ -126,8 +126,8 @@ class _FifoCache: def _escapeRegexRangeChars(s): - # ~ escape these chars: ^-] - for c in r"\^-]": + # escape these chars: ^-[] + for c in r"\^-[]": s = s.replace(c, _bslash + c) s = s.replace("\n", r"\n") s = s.replace("\t", r"\t") -- cgit v1.2.1