Skip to content
Discussion options

You must be logged in to vote

Hi!

Right now, you’ll need to write a custom function for this. But the next version of mq will have a built-in filter_sections function, so it’ll be much easier.

With the new release, you can just do:

include "section" | nodes | filter_sections(fn(x): level(x) < 3;) | collect()

You can try this feature in the playground:
Playground

If you want to try it, you can install the latest version with:

cargo install --git https://github.com/harehare/mq.git mq-run --bin mq

Hope that helps! If you have any other questions, just let me know!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chrgro
Comment options

Answer selected by chrgro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants