diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 175d9ba..54db026 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -329,7 +329,7 @@ pub fn template(i: &str) -> IResult<&str, Template> { } fn temp_string(i: &str) -> IResult<&str, &str> { - escaped(is_not("\""), '\\', one_of(r#""\"#))(i) + escaped(is_not("\"\\"), '\\', one_of("\"\\"))(i) } #[cfg(test)] @@ -610,6 +610,6 @@ mod tests { #[test] fn test_temp_string() { - assert_eq!(temp_string("foo\"bar"), Ok(("", "foo\"bar"))); + assert_eq!(temp_string("foo\\\"bar"), Ok(("", "foo\\\"bar"))); } }