From ba5cc1f1dcdb200ecafe9be4414b1cb030542527 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 29 Aug 2013 17:36:16 +0300 Subject: [PATCH] Remove unneeded parentheses. --- lib/clean.js | 6 ++---- lib/imports/inliner.js | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/clean.js b/lib/clean.js index aca621a8..9a6d7809 100644 --- a/lib/clean.js +++ b/lib/clean.js @@ -32,9 +32,8 @@ var CleanCSS = { options.keepBreaks = options.keepBreaks || false; //active by default - if (options.processImport === undefined) { + if (options.processImport === undefined) options.processImport = true; - } // replace function if (options.debug) { @@ -82,9 +81,8 @@ var CleanCSS = { }); // strip comments with inlined imports - if (data.indexOf('/*') > -1) { + if (data.indexOf('/*') > -1) removeComments(); - } } // strip parentheses in urls if possible (no spaces inside) diff --git a/lib/imports/inliner.js b/lib/imports/inliner.js index 9b73345e..5f49aea1 100644 --- a/lib/imports/inliner.js +++ b/lib/imports/inliner.js @@ -81,9 +81,8 @@ module.exports = function Inliner() { tempData.push(data.substring(cursor, nextStart)); var url = data.substring(nextStart + 4, nextEnd).replace(/['"]/g, ''); - if (url[0] != '/' && url.indexOf('data:') !== 0 && url.substring(url.length - 4) != '.css') { + if (url[0] != '/' && url.indexOf('data:') !== 0 && url.substring(url.length - 4) != '.css') url = path.relative(toBase, path.join(fromBase, url)).replace(/\\/g, '/'); - } tempData.push('url(' + url + ')'); cursor = nextEnd + 1; } -- 2.34.1