mirror of
https://github.com/chmln/sd
synced 2024-11-22 19:23:08 +00:00
Disable unescaping
This commit is contained in:
parent
cddff2a977
commit
effa0fce14
2 changed files with 2 additions and 7 deletions
|
@ -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()
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue