Browse Source

src/utils.js: Fix unescaped "]" inside a regexp

Fixes the following JSHint error:

  ./src/utils.js: line 124, col 15, Unescaped ']'.
redux
David Majda 10 years ago
parent
commit
10cca7b69d
  1. 2
      src/utils.js

2
src/utils.js

@ -121,7 +121,7 @@ function quoteForRegexpClass(s) {
.replace(/\\/g, '\\\\') // backslash
.replace(/\0/g, '\\0') // null, IE needs this
.replace(/\//g, '\\/') // closing slash
.replace(/]/g, '\\]') // closing bracket
.replace(/\]/g, '\\]') // closing bracket
.replace(/-/g, '\\-') // dash
.replace(/\r/g, '\\r') // carriage return
.replace(/\n/g, '\\n') // line feed

Loading…
Cancel
Save