You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> toml.parse(case2)
Thrown:
TomlError: Unexpected character, expected only whitespace or comments till end of line at row 2, col 1, pos 18:
1: foo = 2019-07-14
2> bar = "lorem"
^
at TOMLParser.parseWhitespaceToEOL (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/toml-parser.js:311:26)
at TOMLParser.runOne (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/parser.js:64:30)
at TOMLParser.goto (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/parser.js:87:17)
at TOMLParser.recordAssignStatement (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/toml-parser.js:337:19)
at TOMLParser.runOne (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/parser.js:64:30)
at TOMLParser.returnNow (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/parser.js:107:17)
at TOMLParser.recordAssignValue (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/toml-parser.js:380:19)
at TOMLParser.runOne (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/parser.js:64:30)
at TOMLParser.parse (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/lib/parser.js:45:22)
at Object.parseString [as parse] (/Users/arnau/kitchen/blog/node_modules/@iarna/toml/parse-string.js:13:12) {
name: 'TomlError',
fromTOML: true,
wrapped: null,
line: 1,
col: 0,
pos: 18
}
Hi, depending on what comes after a date, it parses correctly or it raises and exception
TomlError: Incomplete datetime
.Reproduction steps
The exception for
case2
:Environment
OS: macos 10.14.5
nodejs: v12.6.0
npm: 6.9.0
@iarna/toml: 2.2.3
The text was updated successfully, but these errors were encountered: