Fix escape check for escaped backslash
This commit is contained in:
parent
63cc877023
commit
ae01a5b3a2
@ -447,8 +447,9 @@ fn unescape_quotes(s: &str) -> Cow<str> {
|
||||
fn is_invalid_escape(txt: &str) -> bool {
|
||||
// odd number of \s not followed by an escapable character
|
||||
lazy_static! {
|
||||
static ref RE: Regex = Regex::new(r#"(^|[^\\])(\\\\)*\\([^":*_()]|$)"#).unwrap();
|
||||
static ref RE: Regex = Regex::new(r#"(^|[^\\])(\\\\)*\\([^\\":*_()]|$)"#).unwrap();
|
||||
}
|
||||
|
||||
RE.is_match(txt)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user