New lines in multi-line strings trimmed incorrectly #417
Labels
component: decoder
Related to parsing in `toml.load`
syntax: strings
Related to string literals
type: bug
A confirmed bug or unintended behavior
This is similar to #68, but a little different.
In multiline strings, any newlines immediately following the delimiter are trimmed. But according to the TOML specification, if there is at least one newline character, only the first one is trimmed.
TOML spec v1.0.0 says:
It is "A newline", not "newlines" or "all new line".
The following example shows the case of multi-line basic strings (
"""
), but the same applies to multi-line literal strings ('''
).Example
EXPECTED OUTPUT:
ACTUAL OUTPUT:
The text was updated successfully, but these errors were encountered: