If we have an open ended block scalar at the end of the stream:
keep: |+
line1
It should be emitted as:
keep: |+
line1
...
But maybe this rule should not only be for the last document in a stream, but for every document, which is especially important in streaming context:
---
keep: |+
line1
--- doc two
Every document should be able to taken out of a stream and represent the same. If you take it out and accidentally add a newline, then it has one more empty line.
So when emitting the above documents, the output should look like this:
---
keep: |+
line1
...
--- doc two
What do you think? @ingydotnet @hvr @eemeli @pantoniou @am11
Note: This rule is for emitters. The marker would not be required when parsing.
Note 2: Open-ended only means block scalars with trailing empty lines (|+, >+). I know that in YAML 1.1 open-ended has a slightly different meaning.
See also #49
If we have an open ended block scalar at the end of the stream:
It should be emitted as:
But maybe this rule should not only be for the last document in a stream, but for every document, which is especially important in streaming context:
Every document should be able to taken out of a stream and represent the same. If you take it out and accidentally add a newline, then it has one more empty line.
So when emitting the above documents, the output should look like this:
What do you think? @ingydotnet @hvr @eemeli @pantoniou @am11
Note: This rule is for emitters. The marker would not be required when parsing.
Note 2: Open-ended only means block scalars with trailing empty lines (
|+
,>+
). I know that in YAML 1.1 open-ended has a slightly different meaning.