From e78701e60b396597e06ef7491f249797c9b22897 Mon Sep 17 00:00:00 2001 From: David Flatz Date: Mon, 15 Sep 2014 16:27:29 +0200 Subject: make stripping of comments less aggressive, this should fix sporatic crashes of blackberry app on startup --- itjs.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'itjs.class') 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); -- cgit v1.2.3