LESSed up the minification logic

This commit is contained in:
Josh Sherman 2012-10-14 20:05:03 -04:00
parent b31746b1c2
commit 1154a1d901
2 changed files with 2 additions and 2 deletions

View file

@ -157,7 +157,7 @@ class Dynamic extends Object
// Minifies CSS with a few basic character replacements.
$stylesheet = file_get_contents($original_filename);
$stylesheet = str_replace(array("\t", "\n", ', ', ' {', ': ', ';}', ' '), array('', '', ',', '{', ':', '}', ''), $stylesheet);
$stylesheet = str_replace(array("\t", "\n", ', ', ' {', ': ', ';}', '{ ', '; '), array('', '', ',', '{', ':', '}', '{', ';'), $stylesheet);
$stylesheet = preg_replace('/\/\*.+?\*\//', '', $stylesheet);
file_put_contents($minified_filename, $stylesheet);