yaml / yaml-test-suite

Comprehensive, language independent Test Suite for YAML
MIT License
172 stars 58 forks source link

Add test for dashes in flow context #53

Closed perlpunk closed 4 years ago

camilstaps commented 3 years ago

@perlpunk @ingydotnet Could I ask why this YAML is correct? Several parsers have problems with it (http://matrix.yaml.io/details/G5U8.html), and I'm looking at the spec but can't understand why the test should pass.

The relevant rules would be ns-plain-first and subrules:

2021-03-24-210336_639x418

- is an indicator, so the second alternative of ns-plain-first must be used. The next character (, and ]) must then be "safe". I believe we are in flow-key or flow-in context(?), so ns-plain-safe-in is used. Because , and ] are flow indicators, neither list element would be accepted.

Could you explain where I'm going wrong?

perlpunk commented 3 years ago

@camilstaps Yeah, it's actually about to be dropped, see #79 I just was extremely busy during the last months and didn't get to it

camilstaps commented 3 years ago

@perlpunk oh, great! Thanks for the quick reply :blush: