1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-18 03:41:35 +02:00

min/config.php: allows multiple allow directories

Controller/Version1.php: + option to specify multiple allow dirs
Minify_Controller_Base::_fileIsSafe() allows multiple safe dirs
Minify_CSS: shorter line length output
This commit is contained in:
Steve Clay
2008-08-16 15:25:27 +00:00
parent d4e71636b8
commit 348c838c8b
8 changed files with 83 additions and 33 deletions

View File

@@ -171,8 +171,15 @@ class Minify_CSS {
// replace any ws involving newlines with a single newline
$css = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $css);
// separate common descendent selectors with newlines (to limit line lengths)
$css = preg_replace('/([\\w#\\.]+)\\s+([\\w#\\.]+){/', "$1\n$2{", $css);
// separate common descendent selectors w/ newlines (to limit line lengths)
$css = preg_replace('/([\\w#\\.\\*]+)\\s+([\\w#\\.\\*]+){/', "$1\n$2{", $css);
// Use newline after 1st numeric value (to limit line lengths).
$css = preg_replace('/
((?:padding|margin|border|outline):\\d+(?:px|em)?) # 1 = prop : 1st numeric value
\\s+
/x'
,"$1\n", $css);
$rewrite = false;
if (isset($options['prependRelativePath'])) {