From 4cccef79a5c15ad0f65bc5e625234f63f300ac03 Mon Sep 17 00:00:00 2001 From: jazzpi Date: Wed, 10 Jun 2015 18:19:59 +0200 Subject: [PATCH] Replace `\#{delimiter}` with `#{delimiter}` in :s --- lib/ex.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ex.coffee b/lib/ex.coffee index 21f5037..677b4a6 100644 --- a/lib/ex.coffee +++ b/lib/ex.coffee @@ -190,6 +190,9 @@ class Ex throw new CommandError('Trailing characters') spl[1] ?= '' spl[2] ?= '' + notDelimRE = new RegExp("\\\\#{delim}", 'g') + spl[0] = spl[0].replace(notDelimRE, delim) + spl[1] = spl[1].replace(notDelimRE, delim) try pattern = new RegExp(spl[0], spl[2])