Replace \#{delimiter} with #{delimiter} in :s
This commit is contained in:
parent
bf0f492740
commit
4cccef79a5
1 changed files with 3 additions and 0 deletions
|
|
@ -190,6 +190,9 @@ class Ex
|
||||||
throw new CommandError('Trailing characters')
|
throw new CommandError('Trailing characters')
|
||||||
spl[1] ?= ''
|
spl[1] ?= ''
|
||||||
spl[2] ?= ''
|
spl[2] ?= ''
|
||||||
|
notDelimRE = new RegExp("\\\\#{delim}", 'g')
|
||||||
|
spl[0] = spl[0].replace(notDelimRE, delim)
|
||||||
|
spl[1] = spl[1].replace(notDelimRE, delim)
|
||||||
|
|
||||||
try
|
try
|
||||||
pattern = new RegExp(spl[0], spl[2])
|
pattern = new RegExp(spl[0], spl[2])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue