Nett
Nett copied to clipboard
Invalid escape sequences in strings should produce an error
Toml spec says:
For convenience, some popular characters have a compact escape sequence.
\b - backspace (U+0008) \t - tab (U+0009) \n - linefeed (U+000A) \f - form feed (U+000C) \r - carriage return (U+000D) \" - quote (U+0022) \\ - backslash (U+005C) \uXXXX - unicode (U+XXXX) \UXXXXXXXX - unicode (U+XXXXXXXX)
Any Unicode character may be escaped with the
\uXXXX
or\UXXXXXXXX
forms. The escape codes must be valid Unicode scalar values.All other escape sequences not listed above are reserved and, if used, TOML should produce an error.
If I run the followning code:
var data = Toml.ReadString("\"\\v\"=\"hello\"");
Console.WriteLine(data.First().Key);
I'm not getting an error. Is this a bug?