summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--itjs.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/itjs.class b/itjs.class
index fb3ac13..7ac7c1f 100644
--- a/itjs.class
+++ b/itjs.class
@@ -171,7 +171,7 @@ static function strip($code)
{
if (!it::is_devel())
$code = preg_replace(array(
- '|\s//.*$|m',
+ '|(?<=\s//).*$|m', # we use a lookbehind assertion (?<=) to check for beginning of a comment and then strip the rest of the line. we need to keep the newline and // characters to prevent blackberry app from crashing sporadically on startup
'|\s+/\*.*?\*/|s', # MUST require at least one space before /* (jquery.js) but MUST NOT require space before */ (searchmap.js)
'|^\s+|m'
), array(), $code);