From: XhmikosR Date: Thu, 29 Aug 2013 14:36:16 +0000 (+0300) Subject: Remove unneeded parentheses. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ba5cc1f1dcdb200ecafe9be4414b1cb030542527;p=clean-css.git Remove unneeded parentheses. --- 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; }