Skip to content
Snippets Groups Projects
Commit 211d5488df72 authored by Tina Müller (tinita)'s avatar Tina Müller (tinita)
Browse files

Output document end marker after open ended scalars (#162)

parent 45ce8ac56f08
Branches
No related tags found
No related merge requests found
......@@ -652,6 +652,18 @@
else if (event->type == YAML_STREAM_END_EVENT)
{
/**
* This can happen if a block scalar with trailing empty lines
* is at the end of the stream
*/
if (emitter->open_ended)
{
if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0))
return 0;
emitter->open_ended = 0;
if (!yaml_emitter_write_indent(emitter))
return 0;
}
if (!yaml_emitter_flush(emitter))
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment