Ticket #1240: 1240.patch

File 1240.patch, 799 bytes (added by Frederico Caldeira Knabben, 17 years ago)
  • _source/includes/fckjavascriptcompressor.inc

     
    4141                // Protect the script strings.
    4242                $script = $stringsProc->ProtectStrings( $script ) ;
    4343
    44                 // Remove "//" comments
    45                 $script = preg_replace(
    46                         '/\/\/.*$/m',
    47                         '', $script ) ;
    48 
    4944                // Remove "/* */" comments
    5045                $script = preg_replace(
    5146                        '/(?m-s:^\s*\/\*).*?\*\//s',
    5247                        '', $script ) ;
    5348
     49                // Remove "//" comments
     50                $script = preg_replace(
     51                                '/\/\/.*$/m',
     52                                '', $script ) ;
     53               
    5454                // Remove spaces before the ";" at the end of the lines
    5555                $script = preg_replace(
    5656                        '/\s*(?=;\s*$)/m',
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy