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

Fixes the following JSHint error:

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

@ -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