I was missing an escape character
This commit is contained in:
parent
586823aa8a
commit
a0b032ad4b
@ -329,7 +329,7 @@ pub fn template(i: &str) -> IResult<&str, Template> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn temp_string(i: &str) -> IResult<&str, &str> {
|
fn temp_string(i: &str) -> IResult<&str, &str> {
|
||||||
escaped(is_not("\""), '\\', one_of(r#""\"#))(i)
|
escaped(is_not("\"\\"), '\\', one_of("\"\\"))(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
@ -610,6 +610,6 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_temp_string() {
|
fn test_temp_string() {
|
||||||
assert_eq!(temp_string("foo\"bar"), Ok(("", "foo\"bar")));
|
assert_eq!(temp_string("foo\\\"bar"), Ok(("", "foo\\\"bar")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user