Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/toml_parser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ function _parse_key(l::Parser)
else
set_marker!(l)
if accept_batch(l, isvalid_barekey_char)
if !(peek(l) == '.' || peek(l) == ' ' || peek(l) == ']' || peek(l) == '=')
if !(peek(l) == '.' || iswhitespace(peek(l)) || peek(l) == ']' || peek(l) == '=')
c = eat_char(l)
return ParserError(ErrInvalidBareKeyCharacter, c)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/TOML/test/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ using TOML: ParserError
TOML.parse(IOBuffer(str)) ==
TOML.parse(p, str) == TOML.parse(p, SubString(str)) ==
TOML.parse(p, IOBuffer(str)) == dict
@test TOML.parse("a\t=1") == dict
@test_throws ParserError TOML.parse(invalid_str)
@test_throws ParserError TOML.parse(SubString(invalid_str))
@test_throws ParserError TOML.parse(IOBuffer(invalid_str))
Expand Down