askama/testing/templates/macro-import-str-cmp-macro.html
Michael Pollind ce73e73720 feat: add caller pattern and adjust syntax to closer match jinja
Signed-off-by: Michael Pollind <mpollind@gmail.com>
2025-05-22 22:50:40 +02:00

14 lines
268 B
HTML

{% macro strcmp0(s, other) -%}
{%- if s == "foo" -%}
foo
{%- else if s == other -%}
other
{%- else -%}
neither
{%- endif -%}
{% endmacro %}
{% macro strcmp(s) %}
{%- call strcmp0(s, "bar") -%}{%- endcall -%}
{% endmacro %}