bug: preserve unusual keys, empty containers, big ints, emoji, and aliases across the save round-trip#60
Merged
Conversation
…iases across the save round-trip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
\.\[\) so map keys containing literal.(e.g.app.kubernetes.io/part-of) and empty-string keys ("": value) round-trip without splitting or rejection'{}'/'[]'string scalarnull/~/ blank instead of the string<nil>null/~/""as equivalent to an empty entry Value when checking valueUnchanged, so unedited null leaves keep their source style#inside a quoted string stops being misread as an inline comment#round-trip without the leading line being hoisted into a YAML head comment""and saving them as"\"\""acl.userSecret: ""andmaster.persistence.medium: ""from leaking into the saved override9007199254740993to9.007199254740992e+15\Unnnnnnnnand\unnnnescape sequences inside double-quoted scalars back to literal Unicode, so emoji and supplementary-plane characters survive yaml.v3's forced double-quoted escape policyValueon custom-only empty-container entries in RebuildUnifiedEntries so they pass IsFocusable, survive collectOverrides, and stay in the saved filekeyNode.Value == ""skip in parseComments and the position walker so comments on legitimate empty-string keys ("": value) attach to the right flat key