Changeset 2244
- Timestamp:
- 2008-07-21 14:18:36 (6 months ago)
- Location:
- FCKreleaser/trunk
- Files:
-
- 1 added
- 1 modified
-
_dev/gensinglefile.bat (added)
-
fckreleaser.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKreleaser/trunk/fckreleaser.php
r1977 r2244 597 597 $script = $stringsProc->ProtectStrings( $script ) ; 598 598 599 // Remove "/* */" comments 600 $script = preg_replace( 601 '/(?<!\/)\/\*.*?\*\//s', 602 '', $script ) ; 603 599 604 // Remove "//" comments 600 605 $script = preg_replace( 601 '/\/\/.*$/m', 602 '', $script ) ; 603 604 // Remove "/* */" comments 605 $script = preg_replace( 606 '/(?m-s:^\s*\/\*).*?\*\//s', 607 '', $script ) ; 608 606 '/\/\/.*$/m', 607 '', $script ) ; 608 609 609 // Remove spaces before the ";" at the end of the lines 610 610 $script = preg_replace( … … 990 990 function ProtectStrings( $source ) 991 991 { 992 // Catches string literals, regular expressions and conditional comments. 992 993 return preg_replace_callback( 993 '/(?:("|\').*?(?<!\\\\)\1 |(?<![\/\\\\])\/[^\/\*].*?(?<!\\\\)\/)/',994 '/(?:("|\').*?(?<!\\\\)\1)|(?:(?<![\*\/\\\\])\/[^\/\*].*?(?<!\\\\)\/(?=([\.\w])|(\s*[,;}\)])))|(?s:\/\*@(?:cc_on|if|elif|else|end).*?@\*\/)/', 994 995 array( &$this, '_ProtectStringsMatch' ), $source ) ; 995 996 }