iarna / iarna-toml

Better TOML parsing and stringifying all in that familiar JSON interface.
ISC License
316 stars 43 forks source link

Standalone `\r` is accepted by iarna-toml but forbidden by the spec #56

Open mwcz opened 6 months ago

mwcz commented 6 months ago

A multi-line literal string like:

foo = '''\r'''

Is successfully parsed by this module, but per the spec \r is only allowed in multi-line literal strings when followed by \n.

I found this when I came across a string with \r\r that threw an error in the Rust toml crate, but toml-lint.com (powered by iarna-toml) said it was valid.