-
Notifications
You must be signed in to change notification settings - Fork 321
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
Emitter: Don't output trailing space for empty scalar nodes #186
Merged
Conversation
This file contains 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
perlpunk
force-pushed
the
trailing-spaces
branch
2 times, most recently
from
May 31, 2020 13:18
b42710d
to
31958e8
Compare
perlpunk
changed the title
Don't output trailing space for empty scalar nodes
Emitter: Don't output trailing space for empty scalar nodes
May 31, 2020
ingydotnet
reviewed
May 31, 2020
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.
Looks good. Just one small comment.
ingydotnet
reviewed
May 31, 2020
See issue yaml#46 Passing emitter tests: * 2XXW: Spec Example 2.25. Unordered Sets * 5WE3: Spec Example 8.17. Explicit Block Mapping Entries * 6KGN: Anchor for empty node * 6XDY: Two document start markers * 7W2P: Block Mapping with Missing Values * 8KB6: Multiline plain flow mapping key without value * 9BXH: Multiline doublequoted flow mapping key without value * C2DT: Spec Example 7.18. Flow Mapping Adjacent Values * JTV5: Block Mapping with Multiline Scalars * KK5P: Various combinations of explicit block mappings * LE5A: Spec Example 7.24. Flow Nodes * UT92: Spec Example 9.4. Explicit Documents * W42U: Spec Example 8.15. Block Sequence Entry Types * W4TN: Spec Example 9.5. Directives Documents * ZWK4: Key with anchor after missing explicit mapping value
ingydotnet
approved these changes
Jun 1, 2020
tlsa
added a commit
to tlsa/libcyaml
that referenced
this pull request
Jun 27, 2020
Libyaml does not emit trailing whitespace now. Since we want to work with older versions of libyaml too, we check against reference output with and without trailing whitespace. See: yaml/libyaml#186
This was referenced Aug 6, 2020
ShadowsatNight
approved these changes
Dec 17, 2022
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.
src/emitter.c
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.
See issue #46
Passing emitter tests: