diff options
author | ptmcg <ptmcg@austin.rr.com> | 2020-03-29 19:37:18 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2020-03-29 19:37:18 -0500 |
commit | fcbad044c73a0c4006edd34e5586d8a60774ddf4 (patch) | |
tree | 67116b88f005123d6cf7b40d35d6e68d56d37377 /pyparsing/util.py | |
parent | 96fe2688898c1846ea97e2039659b98ed6f71e4e (diff) | |
download | pyparsing-git-fcbad044c73a0c4006edd34e5586d8a60774ddf4.tar.gz |
Fix potential FutureWarning with generated regex; minor reformat of runTests output to break at test comments if any
Diffstat (limited to 'pyparsing/util.py')
-rw-r--r-- | pyparsing/util.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 ``<TAB>``\ s, and suggested + information on parsing strings containing ``<TAB>`` 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 ``<TAB>``\ s, and + for more information on parsing strings containing ``<TAB>`` 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") |