From cdb640efea94a61023fc7637438f56ceca728fb2 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 31 Oct 2012 11:38:13 +0200 Subject: [PATCH] fix a few JSHint warnings --- lib/clean.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/clean.js b/lib/clean.js index d8da80cb..db340da0 100644 --- a/lib/clean.js +++ b/lib/clean.js @@ -56,7 +56,7 @@ var CleanCSS = { // strip url's parentheses if possible (no spaces inside) replace(/url\(['"]([^\)]+)['"]\)/g, function(urlMatch) { - if (urlMatch.match(/\s/g) != null) + if (urlMatch.match(/\s/g) !== null) return urlMatch; else return urlMatch.replace(/\(['"]/, '(').replace(/['"]\)$/, ')'); @@ -79,10 +79,10 @@ var CleanCSS = { replace(/(\r\n)+/g, '\r\n'); // whitespace before !important - replace(/ !important/g, '!important') + replace(/ !important/g, '!important'); // space with a comma - replace(/[ ]?,[ ]?/g, ',') + replace(/[ ]?,[ ]?/g, ','); // restore spaces inside IE filters (IE 7 issue) replace(/progid:[^(]+\(([^\)]+)/g, function(match, contents) { @@ -217,7 +217,7 @@ var CleanCSS = { nextEnd = data.indexOf('*/', nextStart); if (nextStart == -1 || nextEnd == -1) break; - tempData.push(data.substring(cursor, nextStart)) + tempData.push(data.substring(cursor, nextStart)); if (data[nextStart + 2] == '!') { // in case of special comments, replace them with a placeholder context.specialComments.push(data.substring(nextStart, nextEnd + 2)); -- 2.34.1