From c3196916710ad26fe5b3429bb1688060108b2f8b Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 26 Apr 2022 22:09:25 +0200 Subject: Fix invalid check (#678) --- askama_shared/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs index b6b478b..a94c509 100644 --- a/askama_shared/src/lib.rs +++ b/askama_shared/src/lib.rs @@ -275,8 +275,8 @@ impl<'a> TryFrom> for Syntax<'a> { let be = syntax.block_start.as_bytes()[1]; let cs = syntax.comment_start.as_bytes()[0]; let ce = syntax.comment_start.as_bytes()[1]; - let es = syntax.block_start.as_bytes()[0]; - let ee = syntax.block_start.as_bytes()[1]; + let es = syntax.expr_start.as_bytes()[0]; + let ee = syntax.expr_start.as_bytes()[1]; if !((bs == cs && bs == es) || (be == ce && be == ee)) { return Err(format!("bad delimiters block_start: {}, comment_start: {}, expr_start: {}, needs one of the two characters in common", syntax.block_start, syntax.comment_start, syntax.expr_start).into()); } -- cgit