kowainik / tomland

🏝 Bidirectional TOML serialization
https://kowainik.github.io/posts/2019-01-14-tomland
Mozilla Public License 2.0
121 stars 39 forks source link

Fix `genPiece` generating basic string with raw backslash within #390

Closed TotallyNotChase closed 2 years ago

TotallyNotChase commented 2 years ago

Fixes #374

quotedWith now takes in an additional parameter- isAllowed. It's now the caller's responsibility to indicate which characters are allowed within the string generated by quotedWith (the delimiter check is still done by quotedWith).

For basic strings (double quote), control characters, as well as backslashes are disallowed.

For literal strings (single quote), only control characters are disallowed.