Disable unescaping

This commit is contained in:
Greg 2019-01-02 20:54:54 -05:00
parent cddff2a977
commit effa0fce14
2 changed files with 2 additions and 7 deletions

View file

@ -64,9 +64,8 @@ impl<'a> Replacer<'a> {
return content; return content;
} }
let replaced = regex.replace_all(&content, *replace_with).to_string().into()
regex.replace_all(&content, *replace_with).to_string();
utils::unescape(&replaced).unwrap_or_else(|| replaced).into()
}, },
Replacer::Literal(search, replace_with) => { Replacer::Literal(search, replace_with) => {
content.replace(search, replace_with).into() content.replace(search, replace_with).into()

View file

@ -1,9 +1,5 @@
pub(crate) type Result<T> = std::result::Result<T, crate::Error>; pub(crate) type Result<T> = std::result::Result<T, crate::Error>;
pub(crate) fn unescape(s: &str) -> Option<String> {
unescape::unescape(s)
}
pub(crate) fn regex_case_sensitive(pattern: &str) -> bool { pub(crate) fn regex_case_sensitive(pattern: &str) -> bool {
use regex_syntax::Parser; use regex_syntax::Parser;
Parser::new() Parser::new()