From c7dde23dd271b6a1dbb650e510749ceeff81b160 Mon Sep 17 00:00:00 2001 From: Nao Date: Fri, 15 Aug 2014 19:25:54 +0200 Subject: [PATCH] ! Wedge improperly minified CSS like 'selector [attr="..."]' to 'selector[attr="..."]', which doesn't mean the same. (Subs-Cache.php) --- core/app/Subs-Cache.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/app/Subs-Cache.php b/core/app/Subs-Cache.php index 2bdb89d4..ccf10cdd 100644 --- a/core/app/Subs-Cache.php +++ b/core/app/Subs-Cache.php @@ -721,7 +721,9 @@ function wedge_cache_css_files($folder, $ids, $latest_date, $css, $gzip = false, // Remove extra whitespace. Note that this breaks additions and substractions in calc(), as they need their own whitespace. // I'll be fixing this, eventually. But needs more regexes, more CPU time, and this means more kitties getting slaughtered. :( + $final = preg_replace('~\s\[~', '#wedge-bracket#', $final); $final = preg_replace('~\s*([][+:;,>{}\s])\s*~', '$1', $final); + $final = str_replace('#wedge-bracket#', ' [', $final); // This is a bit quirky, like me, as we want to simplify paths but may still break non-path strings in the process. // At this point in the code, thought, strings should be hidden from view so it sounds okay to do that.