diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-04-26 22:09:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 22:09:25 +0200 |
commit | c3196916710ad26fe5b3429bb1688060108b2f8b (patch) | |
tree | c32461e8ce9afb7d58f80330de54dd574ef0746a | |
parent | f997ba97bd298e219f3286fa792ec10874a34079 (diff) | |
download | askama-c3196916710ad26fe5b3429bb1688060108b2f8b.tar.gz askama-c3196916710ad26fe5b3429bb1688060108b2f8b.tar.bz2 askama-c3196916710ad26fe5b3429bb1688060108b2f8b.zip |
Fix invalid check (#678)
-rw-r--r-- | askama_shared/src/lib.rs | 4 |
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()); } |