aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src
diff options
context:
space:
mode:
authorLibravatar Guillaume Gomez <guillaume1.gomez@gmail.com>2022-04-26 22:09:25 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-26 22:09:25 +0200
commitc3196916710ad26fe5b3429bb1688060108b2f8b (patch)
treec32461e8ce9afb7d58f80330de54dd574ef0746a /askama_shared/src
parentf997ba97bd298e219f3286fa792ec10874a34079 (diff)
downloadaskama-c3196916710ad26fe5b3429bb1688060108b2f8b.tar.gz
askama-c3196916710ad26fe5b3429bb1688060108b2f8b.tar.bz2
askama-c3196916710ad26fe5b3429bb1688060108b2f8b.zip
Fix invalid check (#678)
Diffstat (limited to 'askama_shared/src')
-rw-r--r--askama_shared/src/lib.rs4
1 files 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<RawSyntax<'a>> 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());
}