ParseMaster is designed to use big regexes, with many starting characters.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 30 Jan 2011 14:19:55 +0000 (14:19 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 30 Jan 2011 14:19:55 +0000 (14:19 +0000)
It makes sense to pcre_study() them.

includes/libs/JavaScriptDistiller.php

index 358827f..ff2a0b2 100644 (file)
@@ -161,7 +161,7 @@ class ParseMaster {
                foreach ($this->_patterns as $reg) {
                        $regexp .= '(' . substr($reg[self::EXPRESSION], 1, -1) . ')|';
                }
-               $regexp = substr($regexp, 0, -1) . '/';
+               $regexp = substr($regexp, 0, -1) . '/S';
                $regexp .= ($this->ignoreCase) ? 'i' : '';
                
                $string = $this->_escape($string, $this->escapeChar);