Skip to content

Commit

Permalink
Add missing arg to scalar event (#130)
Browse files Browse the repository at this point in the history
* Add missing arg to scalar event

* Add test for empty tag
  • Loading branch information
PhilReinhold committed Apr 18, 2023
1 parent 6d1b676 commit 8a65338
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.jl
Expand Up @@ -294,7 +294,7 @@ function __parse_node(token, stream::EventStream, block, start_mark, end_mark, a
if anchor !== nothing || tag !== nothing
stream.state = pop!(stream.states)
return ScalarEvent(start_mark, end_mark, anchor, tag,
(implicit, false), "")
(implicit, false), "", nothing)
else
node = block ? "block" : "flow"
throw(ParserError("while parsing a $(node) node", start_mark,
Expand Down
2 changes: 2 additions & 0 deletions test/empty_tag.data
@@ -0,0 +1,2 @@
thing:
x: !!str
1 change: 1 addition & 0 deletions test/empty_tag.expected
@@ -0,0 +1 @@
Dict("thing" => Dict("x" => ""))
1 change: 1 addition & 0 deletions test/runtests.jl
Expand Up @@ -47,6 +47,7 @@ const tests = [
"multi-constructor",
"utf-8-bom",
"utf-32-be",
"empty_tag",
]

# ignore some test cases in write_and_load testing
Expand Down

0 comments on commit 8a65338

Please sign in to comment.