Leont / yamlish

An implementation of YAML in Raku
Artistic License 2.0
21 stars 18 forks source link

`foo/{bar}: blubb` is not parsed as yaml #24

Closed ufobat closed 5 years ago

ufobat commented 5 years ago

while parsing openapi specs I realized that YAMLish does not parse foo/{bar}: blubb.

Leont commented 5 years ago

The specification states that «when used as implicit keys, plain scalars must not contain the “[”, “]”, “{”, “}” and “,” characters» (7.3.3), so I think this is not a bug in my code but in those files. They probably should use quoting.

perlpunk commented 5 years ago

It seems that the sentence:

In addition, inside flow collections, or when used as implicit keys, plain scalars must not contain the “[”, “]”, “{”, “}” and “,” characters

contradicts the productions: http://yaml.org/spec/1.2/spec.html#ns-plain-safe-out I think this is block-key context, and there those characters aren't forbidden.

Leont commented 5 years ago

Just pushed a fix :-)

ufobat commented 5 years ago

my schema.yml does now parse without an error! thank you!