* Commiting live hack for handling <onlyinclude> whitespace
[lhc/web/wiklou.git] / includes / Parser.php
index 40aa81e..7760860 100644 (file)
@@ -2508,7 +2508,7 @@ class Parser
 
                        # If there are any <onlyinclude> tags, only include them
                        if ( in_string( '<onlyinclude>', $text ) && in_string( '</onlyinclude>', $text ) ) {
-                               preg_match_all( '/<onlyinclude>(.*?)<\/onlyinclude>\n?/s', $text, $m );
+                               preg_match_all( '/<onlyinclude>\n?(.*?)\n?<\/onlyinclude>/s', $text, $m );
                                $text = '';
                                foreach ($m[1] as $piece)
                                        $text .= $piece;