From: Jakub Pawlowicz Date: Sun, 7 Dec 2014 22:12:01 +0000 (+0000) Subject: Simplifies regular expressions in CleanUp module. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d34256a5901938efad6486bd5d0ae582116a32ce;p=clean-css.git Simplifies regular expressions in CleanUp module. --- diff --git a/lib/selectors/optimizers/clean-up.js b/lib/selectors/optimizers/clean-up.js index d60f79f3..3d0ac9d0 100644 --- a/lib/selectors/optimizers/clean-up.js +++ b/lib/selectors/optimizers/clean-up.js @@ -46,15 +46,14 @@ var CleanUp = { block: function (block) { return block - .replace(/(\s{2,}|\s)/g, ' ') + .replace(/\s+/g, ' ') .replace(/(,|:|\() /g, '$1') .replace(/ \)/g, ')'); }, atRule: function (block) { return block - .replace(/\s/g, ' ') - .replace(/\s{2,}/g, ' ') + .replace(/\s+/g, ' ') .trim(); } };