Changeset 2242 for FCKpackager/trunk

Show
Ignore:
Timestamp:
2008-07-21 13:50:45 (5 months ago)
Author:
fredck
Message:

Fixed and issue introduced with [2237]. The rule of requiring lines containing regexes to have a ";" doesn't work on cases like "if ( ! /regex/.test( ) )". It now only requires division literals to be followed by spaces.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKpackager/trunk/_source/includes/fckstringsprocessor.inc

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