-
-
Notifications
You must be signed in to change notification settings - Fork 142
Description
When opening a toml file containing the following table, the plugin reports the error "expected identifier":
[2024-01-01]
According to the toml spec for tables,
Naming rules for tables are the same as for keys (see definition of Keys above).
Checking the toml spec for keys, we find that
A key may be either bare, quoted, or dotted.
Bare keys may only contain ASCII letters, ASCII digits, underscores, and dashes (
A-Za-z0-9_-
). Note that bare keys are allowed to be composed of only ASCII digits, e.g.1234
, but are always interpreted as strings.
Following that definition, the key 2024-01-01
, even though it looks like a date, is a valid key equivalent to the quoted key "2024-01-01". The vscode plugin recognizes this because using it as a normal key instead of a table key works without errors:
This appears to be date-specific. Invalid dates or keys that look like other values don't cause errors.
I am using version 0.19.2 of the tamasfe.even-better-toml
VSCode extension.