Skip to content

Commit

Permalink
Also allow '?' after a colon
Browse files Browse the repository at this point in the history
See http://yaml.org/spec/1.1/#id907281

Inside of plain scalars in flow collections '?' is not special
  • Loading branch information
perlpunk committed Feb 3, 2018
1 parent a9606b7 commit 1fcc5e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -3436,7 +3436,6 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
&& CHECK(parser->buffer, ':')
&& (
CHECK_AT(parser->buffer, ',', 1)
|| CHECK_AT(parser->buffer, '?', 1)
|| CHECK_AT(parser->buffer, '[', 1)
|| CHECK_AT(parser->buffer, ']', 1)
|| CHECK_AT(parser->buffer, '{', 1)
Expand All @@ -3453,7 +3452,7 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
if ((CHECK(parser->buffer, ':') && IS_BLANKZ_AT(parser->buffer, 1))
|| (parser->flow_level &&
(CHECK(parser->buffer, ',')
|| CHECK(parser->buffer, '?') || CHECK(parser->buffer, '[')
|| CHECK(parser->buffer, '[')
|| CHECK(parser->buffer, ']') || CHECK(parser->buffer, '{')
|| CHECK(parser->buffer, '}'))))
break;
Expand Down

0 comments on commit 1fcc5e0

Please sign in to comment.