Unescape slashes in regexps

This commit is contained in:
Rafael Oleza 2019-05-22 19:16:28 +02:00
parent c3845dd902
commit 411e2a95fb

View File

@ -344,6 +344,10 @@ module.exports = class RipgrepDirectorySearcher {
return '\\-\\-'
}
// ripgrep is quite picky about unnecessarily escaped sequences, so we need to unescape
// them: https://github.com/BurntSushi/ripgrep/issues/434.
regexpStr = regexpStr.replace(/\\\//g, '/')
return regexpStr
}