Skip to content

Commit

Permalink
Fix invalid check (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored Apr 26, 2022
1 parent f997ba9 commit c319691
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions askama_shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit c319691

Please sign in to comment.