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

Scalar following document start indicator parsed incorrectly #1896

Closed
m-dango opened this issue Dec 8, 2023 · 2 comments
Closed

Scalar following document start indicator parsed incorrectly #1896

m-dango opened this issue Dec 8, 2023 · 2 comments
Labels

Comments

@m-dango
Copy link

m-dango commented Dec 8, 2023

Describe the bug

YAML can have scalar data following the start of the document, without requiring a new line. When passing this data into yq, the scalar data is omitted.

Version of yq: 4.40.3
Operating system: mac
Installed via: homebrew

Input Yaml

--- text
...

Example taken from YAML spec: https://yaml.org/spec/1.2.2/#example-directive-indicator

Command
The command you ran:

echo '--- text' | yq .

Actual behavior

---

Expected behavior

---
text

Additional context
Some YAML producers output scalar content in this way.

@mikefarah
Copy link
Owner

Thanks for raising, will be fixed in the next release

mikefarah added a commit that referenced this issue Dec 12, 2023
@mikefarah
Copy link
Owner

Fixed in 4.40.5

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

No branches or pull requests

2 participants