Skip to content

Commit

Permalink
Allow comments in indentless sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
autrilla committed Oct 20, 2016
1 parent 541d5ba commit 149bb1b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion parserc.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,16 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y
if token == nil {
return false
}

if token.typ == yaml_COMMENT_TOKEN {
*event = yaml_event_t{
typ: yaml_COMMENT_EVENT,
value: token.value,
start_mark: token.start_mark,
end_mark: token.end_mark,
}
skip_token(parser)
return true
}
if token.typ == yaml_BLOCK_ENTRY_TOKEN {
mark := token.end_mark
skip_token(parser)
Expand Down

0 comments on commit 149bb1b

Please sign in to comment.