Permalink
Browse files

fixed css midpass filter replacements in _handleComments() call back

method
  • Loading branch information...
1 parent ffe1d9a commit ab124bcc72a5e27e49b2aa49d301240502fdcea6 @kaviththiranga committed Aug 1, 2012
Showing with 19 additions and 1 deletion.
  1. +19 −1 libraries/joomla/media/compressor/css.php
@@ -125,7 +125,25 @@ private function _handleComments($matches)
// Do not replace the preserved and need to keep comments
if ($matches[1] === 'keep')
{
- return '/*';
+ return '/**/';
+ }
+
+ // Replacement for css mid pass filters
+ if ($matches[1] === '" "')
+ {
+ return '/*" "*/';
+ }
+
+ // Replacement for css mid pass filters
+ if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $matches[1]))
+ {
+ return '/*";}}/* */';
+ }
+
+ // Keep any surrounding white space
+ if ((trim($matches[0]) !== $matches[1]))
+ {
+ return ' ';
}
return '';

0 comments on commit ab124bc

Please sign in to comment.