toml
toml copied to clipboard
Line ending backslash not trimming at start of multi-line string
toml: 0.9.3.1
I've narrowed down my reproduction case to this
command = [
"""\
--arg=var"""
]
This produces the following error:
File "p:\ops\staging\talos\master\objects\venv\talos\lib\site-packages\toml.py", line 373, in loads
multibackslash)
File "p:\ops\staging\talos\master\objects\venv\talos\lib\site-packages\toml.py", line 454, in _load_line
raise TomlDecodeError("Invalid date or number")
toml.TomlDecodeError: Invalid date or number
Duplicate of #91 .
Hi Ed,
Thank you for reporting this issue.
~Can you confirm that it was resolved by 1b5bb9e (which fixed #91) ?~ Not sure what that issue has to do with this one, actually.
Hi Ed,
It looks like this is fixed - or rather, your test case no longer produces a TomlDecodeError.
I get the following output: {'command': [' --arg=var']}
According to the spec, the line ending backslash should lead to the parser trimming the leading whitespace so I am leaving this issue open.