Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add errata for text on plain scalar implicit keys #313

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

1 participant