Skip to content

Document-End marker should always be emitted after block scalar with trailing empty lines #123

@perlpunk

Description

@perlpunk

The following YAML demonstrates a case where a document-end marker is important and should not be omitted:

foo: |+
  foo

...

libyaml should emit it even if implicit is true. Currently it does not, pyyaml and ruamel do.

Demo:

libyaml % echo '+STR
+DOC
=VAL |foo\n\n\n
-DOC
-STR' | ./tests/run-emitter-test-suite
|+
  foo


libyaml %

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions