aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_shared/src/parser.rs2
-rw-r--r--testing/tests/simple.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
index eff1779..5bdcb9b 100644
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -146,7 +146,7 @@ named!(expr_array_lit<Expr>, do_parse!(
));
named!(expr_str_lit<Expr>, map!(
- delimited!(char!('"'), is_not!("\""), char!('"')),
+ delimited!(char!('"'), take_until!("\""), char!('"')),
|s| Expr::StrLit(str::from_utf8(s).unwrap())
));
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index bee5690..37027b7 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -187,11 +187,11 @@ fn test_path_compare() {
#[derive(Template)]
-#[template(source = "{% for i in [1, 2] %}{{ i }}{% endfor %}", ext = "txt")]
+#[template(source = "{% for i in [\"a\", \"\"] %}{{ i }}{% endfor %}", ext = "txt")]
struct ArrayTemplate {}
#[test]
fn test_slice_literal() {
let t = ArrayTemplate {};
- assert_eq!(t.render().unwrap(), "12");
+ assert_eq!(t.render().unwrap(), "a");
}