gnprice / toml-cli

MIT License
120 stars 24 forks source link

Error with dotted keys #2

Closed salim-b closed 1 year ago

salim-b commented 4 years ago

toml-cli has obvious issues with dotted keys.

The following TOML snippet

la.la = "bla"

throws the error

Error: TomlError { message: "TOML parse error at line 1, column 3\n  |\n1 | la.la = \"bla\"\n  |   ^\nUnexpected `.`\nExpected `=`\n" }

(or more readable:)

TOML parse error at line 1, column 3
  |
1 | la.la = "bla"
  |   ^
Unexpected `.`
Expected `=`

The same key in table notation on the other hand is parsed fine:

[la]
la = "bla"

Would be awesome if this could be fixed! 🙃

gnprice commented 1 year ago

Thanks @salim-b for the report!

It looks like this was fixed by 8f93d2f46, which upgraded the toml_edit dependency. That fix was released in toml-cli v0.2.1.