-
Notifications
You must be signed in to change notification settings - Fork 28
Fix alias emitted in mapping #125
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
base: main
Are you sure you want to change the base?
Conversation
I should have mentionned it. This is draft. As a proof of concept and for discussion purpose. |
851644f
to
3d03825
Compare
3d03825
to
d98cd1a
Compare
I would prefer that we revert allowing |
d98cd1a
to
7bb6299
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
7bb6299
to
ade13e8
Compare
The DeepEqual asserter was too simple to cover this.
This partially rolls back the changes made with 926dd0b The colon was allowed in the characters allowed for anchor and alias name. But it leads to ambiguity in the YAML structure.
The idea is to make sure that a YAML alias in a mapping is followed by a space before the : An issue appeared with the refactoring made recently that made sure to respect the YAML specification that allows having a `:` in an anchor and alias name.
ade13e8
to
8d9ab3d
Compare
This partially rolls back the changes made with 926dd0b with #47
The colon was allowed in the characters allowed for anchor and alias
name. But it leads to ambiguity in the YAML structure.
This PR also makes sure to emit a space when an alias is used in a key of a mapping node.
Related to:
The issue appeared with the refactoring made with #47 that made sure to respect the YAML specification that allows having a
:
in an anchor and alias name.The issue was reported by @mikefarah when he tried to migrate on go.yaml.in/yaml/v4