mirror of
https://github.com/yaml/libyaml.git
synced 2026-01-26 11:14:28 +00:00
Allow question marks in plain scalars in flow collections (#105)
See http://yaml.org/spec/1.1/#id907281 The question mark isn't mentioned as something special here, only ,[]{} This commit will allow [foo?bar] [foo ? bar] The PR does only change the behaviour when the question mark is in the middle or at the end of the string, not at the beginning, e.g. [?foo] is handled by a different part of the code.
This commit is contained in:
parent
7eb01976a0
commit
1008696708
@ -3465,7 +3465,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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user