]> andersk Git - libyaml.git/commitdiff
The closing single quote needs to be indented...
authorTina Müller <cpan2@tinita.de>
Thu, 14 Jun 2018 17:27:04 +0000 (19:27 +0200)
committerIngy döt Net <ingy@ingy.net>
Sat, 30 Jun 2018 21:47:33 +0000 (14:47 -0700)
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
- '

  '
```

src/emitter.c

index 274449577f24b50788b4194f83dd65e600bb2d59..1400df1cc45c0d5e3693eac39c55b060b7c5e677 100644 (file)
@@ -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;
 
This page took 0.087914 seconds and 5 git commands to generate.