askama/testing/templates/macro.html
Bastien Orivel ea66be1925 Allow {% endmacro name %}
Just migrated a repo from tera to askama and this was one of the only
things that was different. This is also coherent with `{% block %}` for
which I added the same feature years ago.
2022-04-29 13:35:20 +02:00

26 lines
222 B
HTML

1
{%- macro thrice(param) -%}
{{ param }} {{ param }} {{ param }}
{%- endmacro -%}
2
{%- call thrice(s) -%}
3
{%- macro twice(param) -%}
{{ param }} {{ param }}
{%- endmacro twice -%}
4
{%- call twice(s) -%}
5