Open bluenote10 opened 10 months ago
I'm completely new to tera so I may be doing something stupid. I've narrowed the reproduction down to having this macro:
{% macro try_to_negate_value(value) %} {{ -value }} {% endmacro try_to_negate_value %}
and using it like this:
{% import "my_macros" as macros %} {{ macros::try_to_negate_value(value=42) }}
This panics with
--> 33:6 | 33 | {{ -value }} | ^--- | = expected a value that can be negated or an array of values
When removing the minus sign everything works fine, but I don't understand why 42 cannot be negated. A floating point value doesn't work either.
42
I'm completely new to tera so I may be doing something stupid. I've narrowed the reproduction down to having this macro:
and using it like this:
This panics with
When removing the minus sign everything works fine, but I don't understand why
42
cannot be negated. A floating point value doesn't work either.