fix: Treat empty nodes as zero values #415
Closed
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.
Before submitting your PR, please confirm the following.
This code begins to address #414. Basically the idea is, "empty sequence entry" is not actually an "error" and should be treated as a "NullNode" instead.
There are still several additional issues code doesn't yet address, like:
foo:\n-
is treated like a zero length list (which I think is the same behavior as a bug in go-yaml v3 skips blank elements in a sequence whereas v2 does not go-yaml/yaml#1011)foo:\n -
errors out with "string was used where sequence is expected" (when it also should be treated asnull
)Looking for confirmation that I've identified an actual issue and am on the right track to fix it, at which point I will continue trying to address and test for these additional cases.