Skip to content

Add errata for text on plain scalar implicit keys#313

Open
eemeli wants to merge 1 commit intomainfrom
plain-errata
Open

Add errata for text on plain scalar implicit keys#313
eemeli wants to merge 1 commit intomainfrom
plain-errata

Conversation

@eemeli
Copy link
Member

@eemeli eemeli commented Aug 26, 2023

In 7.3.3 the spec has (highlight added by me):

Plain scalars must never contain the “: ” and “ #” character combinations. Such combinations would cause ambiguity with mapping key/value pairs and comments. In addition, inside flow collections, or when used as implicit keys, plain scalars must not contain the “[”, “]”, “{”, “}” and “,” characters. These characters would cause ambiguity with flow collection structures.

But then in a BLOCK-KEY context we use the ns-plain-safe-out rule, which doesn't rule out c-flow-indicator characters.

The text is wrong here, and should be fixed to match the rules. As further evidence of this, we have test 2EBW allowing flow indicators in block map implicit keys; that's passed by all current implementations.

Fixing this disagreement by changing the rules would be a breaking change, so we can't do that.

For context, this was discovered while investigating eemeli/yaml#493, originally reported by @jedwards1211.


By submitting this pull request, I confirm that you can use, modify, copy, and
redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants