Skip to content

Commit

Permalink
Don't output trailing space for empty scalar nodes
Browse files Browse the repository at this point in the history
See issue yaml#46
  • Loading branch information
perlpunk committed May 31, 2020
1 parent 9deee01 commit 73f63ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ yaml_emitter_write_plain_scalar(yaml_emitter_t *emitter,

STRING_ASSIGN(string, value, length);

if (!emitter->whitespace) {
if (!emitter->whitespace && length) {
if (!PUT(emitter, ' ')) return 0;
}

Expand Down

0 comments on commit 73f63ae

Please sign in to comment.