Closed
Description
It seems that when using a QuotedString
with unquote_results=True
(the default), it will incorrectly expand escaped whitespace characters.
For example:
import pyparsing as pp
print(pp.QuotedString(quoteChar='"', escChar='\\').parse_string(r'"\\n"'))
Actual:
['\\\n']
Expected:
['\\n']
It works fine if I pass unquote_results=False
(with the obvious downside of not unquoting the results...):
print(pp.QuotedString(quoteChar='"', escChar='\\', unquote_results=False).parse_string(r'"\\n"')
gives
['"\\\\n"']
Metadata
Metadata
Assignees
Labels
No labels