From ea66be1925456285f897bc00a076e4e7af94c313 Mon Sep 17 00:00:00 2001 From: Bastien Orivel Date: Fri, 29 Apr 2022 13:12:18 +0200 Subject: 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. --- testing/templates/macro.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'testing/templates/macro.html') diff --git a/testing/templates/macro.html b/testing/templates/macro.html index 30ea742..f2f89e0 100644 --- a/testing/templates/macro.html +++ b/testing/templates/macro.html @@ -11,3 +11,15 @@ {%- call thrice(s) -%} 3 + +{%- macro twice(param) -%} + +{{ param }} {{ param }} + +{%- endmacro twice -%} + +4 + +{%- call twice(s) -%} + +5 -- cgit