Changeset 2243 for FCKpackager/trunk

Show
Ignore:
Timestamp:
2008-07-21 14:15:18 (5 months ago)
Author:
fredck
Message:

Still fixing the regex to match regexes. This seems to be the final change for it.
Updating also the single file and exe.

Location:
FCKpackager/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • FCKpackager/trunk/fckpackager.php

    r2238 r2243  
    309309                // Remove "/* */" comments 
    310310                $script = preg_replace( 
    311                         '/\/\*.*?\*\//s', 
     311                        '/(?<!\/)\/\*.*?\*\//s', 
    312312                        '', $script ) ; 
    313313 
     
    702702                // Catches string literals, regular expressions and conditional comments. 
    703703                return preg_replace_callback( 
    704                         '/(?:("|\').*?(?<!\\\\)\1)|(?:(?<![\*\/\\\\])\/[^\/\*].*?(?<!\\\\)\/(?!\s+[\w\d])(?=.*;))|(?s:\/\*@(?:cc_on|if|elif|else|end).*?@\*\/)/', 
     704                        '/(?:("|\').*?(?<!\\\\)\1)|(?:(?<![\*\/\\\\])\/[^\/\*].*?(?<!\\\\)\/(?=([\.\w])|(\s*[,;}\)])))|(?s:\/\*@(?:cc_on|if|elif|else|end).*?@\*\/)/', 
    705705                        array( &$this, '_ProtectStringsMatch' ), $source ) ; 
    706706        } 
  • FCKpackager/trunk/_source/includes/fckstringsprocessor.inc

    r2242 r2243  
    3434                // Catches string literals, regular expressions and conditional comments. 
    3535                return preg_replace_callback( 
    36                         '/(?:("|\').*?(?<!\\\\)\1)|(?:(?<![\*\/\\\\])\/[^\/\*].*?(?<!\\\\)\/(?=[\.\w;[({]))|(?s:\/\*@(?:cc_on|if|elif|else|end).*?@\*\/)/', 
     36                        '/(?:("|\').*?(?<!\\\\)\1)|(?:(?<![\*\/\\\\])\/[^\/\*].*?(?<!\\\\)\/(?=([\.\w])|(\s*[,;}\)])))|(?s:\/\*@(?:cc_on|if|elif|else|end).*?@\*\/)/', 
    3737                        array( &$this, '_ProtectStringsMatch' ), $source ) ; 
    3838        }