From: Tina Müller Date: Thu, 14 Jun 2018 17:27:04 +0000 (+0200) Subject: The closing single quote needs to be indented... X-Git-Tag: upstream/0.2.2^2~17 X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/commitdiff_plain/baf636a74b4b6d055d93e2d01366d6097eb82d90 The closing single quote needs to be indented... if it's on its own line. ``` % cd libyaml % echo "+STR +DOC +SEQ =VAL '\\\n -SEQ -DOC -STR" | ./tests/run-emitter-test-suite - ' ' % # fix % make ... % echo "+STR +DOC +SEQ =VAL '\\\n -SEQ -DOC -STR" | ./tests/run-emitter-test-suite - ' ' ``` --- diff --git a/src/emitter.c b/src/emitter.c index 2744495..1400df1 100644 --- a/src/emitter.c +++ b/src/emitter.c @@ -2001,6 +2001,9 @@ yaml_emitter_write_single_quoted_scalar(yaml_emitter_t *emitter, } } + if (breaks) + if (!yaml_emitter_write_indent(emitter)) return 0; + if (!yaml_emitter_write_indicator(emitter, "'", 0, 0, 0)) return 0;