Allow escaping quotes in strings.

This commit is contained in:
Stephen Chung
2020-04-11 12:46:10 +08:00
parent c1b16b1a35
commit d73cfb6da5
4 changed files with 22 additions and 2 deletions

View File

@@ -978,7 +978,10 @@ impl<'a> TokenIterator<'a> {
}
// \{enclosing_char} - escaped
ch if enclosing_char == ch && !escape.is_empty() => result.push(ch),
ch if enclosing_char == ch && !escape.is_empty() => {
escape.clear();
result.push(ch)
}
// Close wrapper
ch if enclosing_char == ch && escape.is_empty() => break,