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
Currently, we can't pass expressions as arguments to macros (or filters). So code like this doesn't work:
{% call release_macros::header( {% if description.is_empty() %}""{% else %}description{% endif %}, tab=release_type, owner={% if let Some(owner) = owner %}owner{% else %}false{% endif %} ) %}
Would you agree to add support for this?
The text was updated successfully, but these errors were encountered:
Ugh. Are there workarounds, and how bad are they? Is there precedent for this in other Jinja(-like) engines?
Sorry, something went wrong.
In tera at least, can't find anything mentioned about it in the official jinja package in python though.
tera
And the workaround isn't that ugly, you just declare a variable above instead:
{% set owner = false %} {% if let Some(owner_val) = owner %} {% set owner = owner_val %} {% endif %} {% call release_macros::header( {% if description.is_empty() %}""{% else %}description{% endif %}, tab=release_type, owner=owner ) %}
Okay, let's keep this open and see if anyone else turns up with similar requirements.
No branches or pull requests
Currently, we can't pass expressions as arguments to macros (or filters). So code like this doesn't work:
Would you agree to add support for this?
The text was updated successfully, but these errors were encountered: