Open GuillaumeGomez opened 5 months ago
Ugh. Are there workarounds, and how bad are they? Is there precedent for this in other Jinja(-like) engines?
In tera
at least, can't find anything mentioned about it in the official jinja package in python though.
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.
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?