crashes with off-by-one error. (github inserts a newline there, there is no newline on the second example after comment)
toml\src\toml\toml.d(1007): index [328] is out of bounds for array of length 328
code here:
void readKeyValue(string[] keys) {
if (clear()) {
enforceParser(data[index++] == '=', "Expected '=' after key declaration");
if (clear!false()) {
set(keys, readValue());
// there must be nothing after the key/value declaration except comments and whitespaces
if (clear!false())
1007: enforceParser(data[index] == '\n', "Invalid characters after value declaration: " ~ data[index]);
This TOML might violate the spec, but there should be a proper error then, not a random range violation. I only see warnings about newlines after keyvalue pairs though:
works fine (has newline after comment)
crashes with off-by-one error. (github inserts a newline there, there is no newline on the second example after comment)
code here: