Permalink
Browse files

Merge pull request #5 from druu/patch-1

Optimized charset replace pattern.
  • Loading branch information...
2 parents 0f724a4 + fe1a1c1 commit 73b4e6cac0d55a601e36cf3a11d64d6977b7fbd6 @ericbarnes committed Dec 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 libraries/Minify/drivers/Minify_css.php
View
2 libraries/Minify/drivers/Minify_css.php
@@ -94,7 +94,7 @@ public function min($file = '', $compact = TRUE, $is_aggregated = NULL)
*/
private function remove_charsets($contents)
{
- return preg_replace('/^@charset\s+[\'"](\S*)\b[\'"];/i', '', $contents);
+ return preg_replace('/^\s*@charset\s+[\'"](?:\S*)\b[\'"];/i', '', $contents);
}
// ------------------------------------------------------------------------

0 comments on commit 73b4e6c

Please sign in to comment.