From 6e934fcccad134a0aa9d8e53eaffe8e66a9ea8e7 Mon Sep 17 00:00:00 2001 From: David Majda Date: Tue, 13 Sep 2011 18:59:12 +0200 Subject: [PATCH] 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. --- src/utils.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/utils.js b/src/utils.js index 88b4363..00d098e 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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); - } + }; }