dtolnay/serde-yaml

ignore trailing document separators

Opened this issue · 0 comments

trailing commas are ignored already
[ 1, 2, ] is the same as [ 1, 2 ]

but currently, trailing document separators create an empty document

1
---
2
---

expected: ignore the empty document after 2
so the result is the same as

1
---
2

this would make it easier to generate a stream of yaml documents in a for loop
always using --- as "end of document" also if there is no next document

via ast-grep/ast-grep#942