|
|
@@ -359,7 +359,7 @@ this.cssMinifier = this.cssMinifier || (() => {
|
|
|
const REGEXP_PRESERVE_MATRIX = /\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g;
|
|
|
const REGEXP_REMOVE_SPACES = /(^|\})(([^{:])+:)+([^{]*{)/g;
|
|
|
const REGEXP_REMOVE_SPACES2 = /\s+([!{;:>+()\],])/g;
|
|
|
- const REGEXP_REMOVE_SPACES2_BIS = /[^\\]\s+([}])/g;
|
|
|
+ const REGEXP_REMOVE_SPACES2_BIS = /([^\\])\s+([}])/g;
|
|
|
const REGEXP_RESTORE_SPACE_IMPORTANT = /!important/g;
|
|
|
const REGEXP_PSEUDOCLASSCOLON = /___PSEUDOCLASSCOLON___/g;
|
|
|
const REGEXP_COLUMN = /:/g;
|
|
|
@@ -540,7 +540,7 @@ this.cssMinifier = this.cssMinifier || (() => {
|
|
|
|
|
|
// remove spaces before the things that should not have spaces before them.
|
|
|
content = content.replace(REGEXP_REMOVE_SPACES2, "$1");
|
|
|
- content = content.replace(REGEXP_REMOVE_SPACES2_BIS, "$1");
|
|
|
+ content = content.replace(REGEXP_REMOVE_SPACES2_BIS, "$1$2");
|
|
|
|
|
|
// restore spaces for !important
|
|
|
content = content.replace(REGEXP_RESTORE_SPACE_IMPORTANT, " !important");
|