From d38e2b4e2651b7c8b1a8bf614377011d046250f6 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Wed, 2 Aug 2023 10:24:11 +0200 Subject: parser: fix white space issues in macro parsing --- askama_parser/src/node.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/askama_parser/src/node.rs b/askama_parser/src/node.rs index d902936..4c21ad1 100644 --- a/askama_parser/src/node.rs +++ b/askama_parser/src/node.rs @@ -459,10 +459,10 @@ impl<'a> Macro<'a> { |i| s.tag_block_start(i), opt(Whitespace::parse), ws(keyword("endmacro")), - cut(tuple((opt(ws(keyword(name))), opt(Whitespace::parse)))), + cut(preceded(ws(opt(keyword(name))), opt(Whitespace::parse))), ))), ))); - let (i, (contents, (_, pws2, _, (_, nws2)))) = end(i)?; + let (i, (contents, (_, pws2, _, nws2))) = end(i)?; assert_ne!(name, "super", "invalid macro name 'super'"); -- cgit