Open asomov opened 2 months ago
What do you mean by that? The 1.2 spec allows colons in anchor names: https://yaml.org/spec/1.2.2/#rule-ns-anchor-char
But the tests (Y2GN, 2SXE) still check that colon should be accepted as a valid character
The test suite is currently targeting YAML 1.2, so it's correct.
@perlpunk I mean that many parsers (including online checkers) do not allow colon in the anchor. It causes tons of misunderstanding SnakeYAML has to drop some test cases in the suite to stay sound.
I only saw the linked issue now: https://github.com/jruby/jruby/issues/8352 I answered there. The important point there is: an emitter must add a space after an alias, if it is used as a mapping key, otherwise the colon is parsed as part of the anchor.
*1 : true
# not:
# *1: true
We cannot fix this problem simply by removing those tests from the test suite. But you can fix Snake YAML to create valid YAML.
There is a clear restriction in the anchor names But the tests (Y2GN, 2SXE) still check that colon should be accepted as a valid character