Type: trimmings
Fichier
-
advagg_css_compress/
css-compressor-3.x/ src/ lib/ Trim.inc, line 33
Classe
- CSSCompression_Trim
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private $trimmings = array(
'patterns' => array(
"/(?<!\\\\)(\\s+)?(?<!\\\\)([!,{};>\\~\\+\\/])(?<!\\\\)(\\s+)?/s",
// Remove un-needed spaces around special characters
"/url\\((?<!\\\\)\"(.*?)(?<!\\\\)\"\\)/is",
// Remove quotes from urls
"/url\\((?<!\\\\)'(.*?)(?<!\\\\)'\\)/is",
// Remove single quotes from urls
"/url\\((.*?)\\)/is",
// Lowercase url wrapper
"/(?<!\\\\);{2,}/",
// Remove unecessary semi-colons
"/(?<!\\\\)\\s+/s",
),
'replacements' => array(
'$2',
'url($1)',
'url($1)',
'url($1)',
';',
' ',
),
);