js: Fix no-useless-escape errors.

Generated manually, since ESLint doesn’t have a fixer for this.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-16 14:08:05 -07:00
committed by Tim Abbott
parent ac64d03988
commit 569b38fe34
10 changed files with 13 additions and 19 deletions

View File

@@ -148,8 +148,7 @@ exports.strcmp = exports.make_strcmp();
exports.escape_regexp = function (string) {
// code from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
// Modified to escape the ^ to appease jslint. :/
return string.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g, "\\$1");
return string.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
};
exports.array_compare = function util_array_compare(a, b) {