mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 18:32:52 +09:00
r7049 보완. 주석 제거는 하지 않음.; (위험 부담이 큼;)
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7059 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a21b9b5380
commit
227e9646b6
1 changed files with 2 additions and 6 deletions
|
|
@ -157,7 +157,7 @@
|
|||
unset($str);
|
||||
}
|
||||
|
||||
$str_to_write = $this->doCompressCode($str_to_write);
|
||||
$str_to_write = $this->doCompressCode($str_to_write, $type);
|
||||
|
||||
$file_object->write($str_to_write);
|
||||
$file_object->close();
|
||||
|
|
@ -251,14 +251,10 @@ if(!$cached) {
|
|||
return 'url("'.$target.'")';
|
||||
}
|
||||
|
||||
function doCompressCode($str_code) {
|
||||
function doCompressCode($str_code, $type) {
|
||||
$str_code = str_replace("\r", "\n", $str_code);
|
||||
$str_code = preg_replace("!\/\*([^\"']*?)\*\/!sm", '', $str_code);
|
||||
$str_code = preg_replace("!^([ \t]+)!m", '', $str_code);
|
||||
$str_code = preg_replace("!([ \t]+)$!m", '', $str_code);
|
||||
$str_code = preg_replace("!^\/\*([^/]*?)\*\/$!sm", '', $str_code);
|
||||
$str_code = preg_replace("!^\/\*([^*]*?)\*\/$!sm", '', $str_code);
|
||||
$str_code = preg_replace("!^\/\/([^\n'\"]*)$!m", '', $str_code);
|
||||
$str_code = preg_replace("!(\n{2,})!m", "\n", $str_code);
|
||||
|
||||
return trim($str_code);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue