Fixes #88 - extra space in '! important'.
authorGoalSmashers <jakub@goalsmashers.com>
Fri, 29 Mar 2013 23:27:53 +0000 (00:27 +0100)
committerGoalSmashers <jakub@goalsmashers.com>
Fri, 29 Mar 2013 23:27:53 +0000 (00:27 +0100)
History.md
lib/clean.js
test/unit-test.js

index 64c5689..a2e187b 100644 (file)
@@ -8,6 +8,7 @@
 * Fixed issue [#2](https://github.com/GoalSmashers/clean-css/issues/2) - resolving `@import` rules.
 * Fixed issue [#80](https://github.com/GoalSmashers/clean-css/issues/80) - quotation in multi line strings.
 * Fixed issue [#92](https://github.com/GoalSmashers/clean-css/issues/92) - uppercase hex to short versions.
+* Fixed issue [#88](https://github.com/GoalSmashers/clean-css/issues/88) - removes space in '! important'.
 
 0.10.2 / 2013-03-19
 ==================
index 0bb9804..6e1561a 100644 (file)
@@ -157,7 +157,7 @@ var CleanCSS = {
     replace(/ ([+~>]) /g, '$1');
 
     // remove extra spaces inside content
-    replace(/([\(\{\}:;=,\n]) /g, '$1');
+    replace(/([!\(\{\}:;=,\n]) /g, '$1');
     replace(/ ([!\)\{\};=,\n])/g, '$1');
     replace(/(?:\r\n|\n)\}/g, '}');
     replace(/([\{;,])(?:\r\n|\n)/g, '$1');
index 9810c9a..9fb057a 100644 (file)
@@ -699,6 +699,10 @@ title']",
     'space before': [
       "body{background-color:#fff  !important}",
       "body{background-color:#fff!important}"
+    ],
+    'space between ! and important': [
+      "body{background-color:#fff  ! important}",
+      "body{background-color:#fff!important}"
     ]
   }),
   'empty elements': cssContext({