Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to persist document delimiters (---) when reading a multi-document file #573

Closed
bioball opened this issue Oct 29, 2020 · 1 comment

Comments

@bioball
Copy link

bioball commented Oct 29, 2020

Currently, reading multiple documents strips the --- delimiter that denotes the start of each document. For instance, take the following file:

---
a: 1
---
a: 2
---
a: 3

And run the following

yq r -d'*' test.yaml ""

It outputs the following:

a: 1
a: 2
a: 3

The output here is invalid yaml, and moreover; there might be times where you might want to keep the output as multiple documents. Ideally there should be a way to produce this output:

---
a: 1
---
a: 2
---
a: 3
@mikefarah mikefarah added this to the 4.0 - beta milestone Oct 30, 2020
@mikefarah
Copy link
Owner

Going to add a way of doing this in v4 (currently in dev)

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

No branches or pull requests

2 participants