aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askama/src/parser.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/askama/src/parser.rs b/askama/src/parser.rs
index b642b00..1e2b94e 100644
--- a/askama/src/parser.rs
+++ b/askama/src/parser.rs
@@ -33,9 +33,7 @@ fn take_content(i: &[u8]) -> IResult<&[u8], Node> {
if *c == b'{' {
if i.len() < j + 2 {
return IResult::Done(&i[..0], Node::Lit(&i[..]));
- } else if i[j + 1] == '{' as u8 {
- return IResult::Done(&i[j..], Node::Lit(&i[..j]));
- } else if i[j + 1] == '%' as u8 {
+ } else if i[j + 1] == b'{' || i[j + 1] == b'%' {
return IResult::Done(&i[j..], Node::Lit(&i[..j]));
}
}