I was missing an escape character

This commit is contained in:
Tom Alexander 2020-04-06 20:45:39 -04:00
parent 586823aa8a
commit a0b032ad4b
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 2 additions and 2 deletions

View File

@ -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")));
}
}