From 247c1c5d1105cce361fd81b965640bc8e25aa09e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 21 Jan 2006 12:47:30 +0100 Subject: strip (incorrect but common) one line comments in CSS compressor darcs-hash:20060121114730-7ad00-773f787251a52d230aee9078fb2c974ffe37599a.gz --- lib/exe/css.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/exe/css.php b/lib/exe/css.php index 1c265b449..5973991ef 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -241,6 +241,9 @@ function css_pluginstyles($mode='screen'){ * @author Andreas Gohr */ function css_compress($css){ + //strip (incorrect but common) one line comments + $css = preg_replace('!//.*$!m','',$css); + // strip whitespaces $css = preg_replace('![\r\n\t ]+!',' ',$css); $css = preg_replace('/ ?([:;,{}\/]) ?/','\\1',$css); -- cgit v1.2.3