diff options
author | Tina Müller (tinita) <cpan2@tinita.de> | 2020-06-01 21:28:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 21:28:43 +0200 |
commit | 1008696708b56c27709e6948b419d44e0f1bfb0d (patch) | |
tree | 8788eeefbb3b88ed2e01bd28462a6b4a82b46160 | |
parent | 7eb01976a05d9a43f3d3d7ffe870a1c4a0f1090d (diff) | |
download | libyaml-git-1008696708b56c27709e6948b419d44e0f1bfb0d.tar.gz |
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.
-rw-r--r-- | src/scanner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scanner.c b/src/scanner.c index 50d601a..c6b4987 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -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; |