diff options
author | René Kijewski <rene.kijewski@fu-berlin.de> | 2023-08-02 10:24:11 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-08-02 11:09:05 +0200 |
commit | d38e2b4e2651b7c8b1a8bf614377011d046250f6 (patch) | |
tree | d7726a237be9e851817cdcd1af24037b910071d2 /askama_parser | |
parent | 06ad86b1e1c7f8ff95841e91e0557f67cbbde6d5 (diff) | |
download | askama-d38e2b4e2651b7c8b1a8bf614377011d046250f6.tar.gz askama-d38e2b4e2651b7c8b1a8bf614377011d046250f6.tar.bz2 askama-d38e2b4e2651b7c8b1a8bf614377011d046250f6.zip |
parser: fix white space issues in macro parsing
Diffstat (limited to '')
-rw-r--r-- | askama_parser/src/node.rs | 4 |
1 files 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'"); |