src/utils.js: Fix missing/unnecessary semicolons

Fixes the following JSHint errors:

  ./src/utils.js: line 108, col 2, Unnecessary semicolon.
  ./src/utils.js: line 128, col 39, Missing semicolon.
  ./src/utils.js: line 140, col 4, Missing semicolon.
redux
David Majda 13 years ago
parent 938f655ccf
commit 6e934fccca

@ -105,7 +105,7 @@ function quote(s) {
.replace(/\n/g, '\\n') // line feed
.replace(/[\x80-\uFFFF]/g, escape) // non-ASCII characters
+ '"';
};
}
/*
* Escapes characters inside the string so that it can be used as a list of
@ -118,14 +118,14 @@ function quoteForRegexpClass(s) {
* For portability, we also escape escape all non-ASCII characters.
*/
return s
.replace(/\\/g, '\\\\') // backslash
.replace(/\0/g, '\\0') // null, IE needs this
.replace(/\//g, '\\/') // closing slash
.replace(/]/g, '\\]') // closing bracket
.replace(/-/g, '\\-') // dash
.replace(/\r/g, '\\r') // carriage return
.replace(/\n/g, '\\n') // line feed
.replace(/[\x80-\uFFFF]/g, escape) // non-ASCII characters
.replace(/\\/g, '\\\\') // backslash
.replace(/\0/g, '\\0') // null, IE needs this
.replace(/\//g, '\\/') // closing slash
.replace(/]/g, '\\]') // closing bracket
.replace(/-/g, '\\-') // dash
.replace(/\r/g, '\\r') // carriage return
.replace(/\n/g, '\\n') // line feed
.replace(/[\x80-\uFFFF]/g, escape); // non-ASCII characters
}
/*
@ -137,5 +137,5 @@ function quoteForRegexpClass(s) {
function buildNodeVisitor(functions) {
return function(node) {
return functions[node.type].apply(null, arguments);
}
};
}

Loading…
Cancel
Save