Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

ignore trailing document separators #413

Open
milahu opened this issue Feb 23, 2024 · 0 comments
Open

ignore trailing document separators #413

milahu opened this issue Feb 23, 2024 · 0 comments

Comments

@milahu
Copy link

milahu commented Feb 23, 2024

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant