diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-03-14 17:59:18 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-03-14 17:59:18 +0100 |
| commit | 2c5a29fc9f3746d3e7aa3d7725628a9162af2905 (patch) | |
| tree | 9791fc91824ae070a1b7e0da369faa8a4dbf1f71 /src | |
| parent | badc615a92a3778778c2f14ce8bcc951313b5d9f (diff) | |
| download | frippy-2c5a29fc9f3746d3e7aa3d7725628a9162af2905.tar.gz frippy-2c5a29fc9f3746d3e7aa3d7725628a9162af2905.zip | |
Remove the requirement to escape all backslashes
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/sed.rs | 5 |
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; } |
