Changeset 2238 for FCKpackager/trunk

Show
Ignore:
Timestamp:
2008-07-21 12:27:07 (5 months ago)
Author:
fredck
Message:

Updated the single file and the exe version with the changes introduced with [2237].

Location:
FCKpackager/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKpackager/trunk/fckpackager.php

    r2202 r2238  
    309309                // Remove "/* */" comments 
    310310                $script = preg_replace( 
    311                         '/(?m-s:^\s*\/\*).*?\*\//s', 
     311                        '/\/\*.*?\*\//s', 
    312312                        '', $script ) ; 
    313313 
     
    700700        function ProtectStrings( $source ) 
    701701        { 
     702                // Catches string literals, regular expressions and conditional comments. 
    702703                return preg_replace_callback( 
    703                         '/(?:("|\').*?(?<!\\\\)\1|(?<![\/\\\\])\/[^\/\*].*?(?<!\\\\)\/)/', 
     704                        '/(?:("|\').*?(?<!\\\\)\1)|(?:(?<![\*\/\\\\])\/[^\/\*].*?(?<!\\\\)\/(?!\s+[\w\d])(?=.*;))|(?s:\/\*@(?:cc_on|if|elif|else|end).*?@\*\/)/', 
    704705                        array( &$this, '_ProtectStringsMatch' ), $source ) ; 
    705706        }