summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Flatz2014-09-15 16:27:29 +0200
committerDavid Flatz2014-09-15 16:27:29 +0200
commite78701e60b396597e06ef7491f249797c9b22897 (patch)
tree82d22d282bfd5e60f3ad33aba44556b1763ba3cf
parent7b80022d7ec241f522d505fa790b955eb841f1a2 (diff)
downloaditools-e78701e60b396597e06ef7491f249797c9b22897.tar.gz
itools-e78701e60b396597e06ef7491f249797c9b22897.tar.bz2
itools-e78701e60b396597e06ef7491f249797c9b22897.zip
make stripping of comments less aggressive, this should fix sporatic crashes of blackberry app on startup
-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);