From 63b98ec7d379768d771966c6aa44de20862e0994 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Mon, 30 Jan 2023 13:09:49 +0100 Subject: Extends expects a string and nothing else --- askama_derive/src/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'askama_derive/src/parser.rs') diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs index bcf9c58..5045731 100644 --- a/askama_derive/src/parser.rs +++ b/askama_derive/src/parser.rs @@ -24,7 +24,7 @@ pub(crate) enum Node<'a> { Cond(Vec>, Ws), Match(Ws, Expr<'a>, Vec>, Ws), Loop(Loop<'a>), - Extends(Expr<'a>), + Extends(&'a str), BlockDef(Ws, &'a str, Vec>, Ws), Include(Ws, &'a str), Import(Ws, &'a str, &'a str), @@ -985,7 +985,7 @@ fn block_for<'a>(i: &'a str, s: &State<'_>) -> IResult<&'a str, Node<'a>> { } fn block_extends(i: &str) -> IResult<&str, Node<'_>> { - let (i, (_, name)) = tuple((ws(keyword("extends")), ws(expr_str_lit)))(i)?; + let (i, (_, name)) = tuple((ws(keyword("extends")), ws(str_lit)))(i)?; Ok((i, Node::Extends(name))) } -- cgit