Unify when-xxx filters and {{< var >}} for conditionals #12762
SanaeBer-03
started this conversation in
Feature Requests
Replies: 1 comment
-
Your are mixing two completely different things. Note that you can write your own Quarto extension to implement this but I highly suggest you don't mix syntaxes. Additionally, please format your post using inline code and code block. ::: {.conditional-var length eq="100m"}
…content shown only when length == 100 m…
::: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hello,
I’m proposing to unify the conditional behavior of the {{< var >}} macro and the when-xxx filters so that one single syntax can cover:
Value-based checks (e.g. eq="100m")
Numeric comparisons (gt, lt, ge, le)
Contextual switches (format, output, engine, etc.)
Instead of maintaining separate pipelines for when-format, when-length, when-score, etc., you could write:
{{< var length eq="100m" >}}
…content shown only when
length == 100 m
…{{< /var >}}
and similarly handle all other cases. Is there any plan to merge these two systems into one? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions