aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/sed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/sed.rs')
-rw-r--r--src/plugins/sed.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/sed.rs b/src/plugins/sed.rs
index e583811..4c7e215 100644
--- a/src/plugins/sed.rs
+++ b/src/plugins/sed.rs
@@ -53,7 +53,10 @@ impl Sed {
let mut escape = false;
for c in input.chars() {
- if !escape && c == '\\' {
+ if escape && !r"/\".contains(c) {
+ output.push('\\');
+
+ } else if !escape && c == '\\' {
escape = true;
continue;
}