We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Many markdown files start with a YAML header block. Would be nice for yq to support them.
yq
Currently yq complains about the markdown:
$ cat doc.md --- title: Foo author: [Bar] --- Some *Example* markdown $ yq .title doc.md "Foo" jq: error (at <stdin>:2): Cannot index string with string "title"
Option to parse only the first document per filestream.
$ yq --blocks=1 .title doc.md "Foo"
$ awk '{ if ($1 == "---" || $1 == "...") n+=1; if(n>1) exit 0; print; }' doc.md | yq .title
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Many markdown files start with a YAML header block. Would be nice for
yq
to support them.current behaviour
Currently
yq
complains about the markdown:desired behaviour
Option to parse only the first document per filestream.
$ yq --blocks=1 .title doc.md "Foo"
alternative
The text was updated successfully, but these errors were encountered: