lua-toml
lua-toml copied to clipboard
Partial CRLF newlines are still considered newlines
Due to the fact that lua-toml uses pattern-matching to find newlines, multi-character newlines can be split up and still match.
The official TOML definition of a newline is either 0x0A or 0x0D0A. Put into a pattern, this becomes [\10\13\10]. This means lua-toml will match either \10 (0x0A) or \13 (0x0D) - the second \10 is redundant.
In other words, lua-toml currently matches on \13 rather than \13\10 when looking for newlines. To fix this would require moving away from pattern matching.
I've added a new test for this behavior, which lua-toml currently fails.