BUG#1269 - Fix section editing for articles with verbatim <h[1-6]> sections
authorJens Frank <jeluf@users.mediawiki.org>
Thu, 6 Jan 2005 00:13:49 +0000 (00:13 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Thu, 6 Jan 2005 00:13:49 +0000 (00:13 +0000)
There's a space added before the closing bracket during processing of HTML tags.
Changed the regexp to also match </h1 >

includes/Parser.php

index 1d2bc62..f9571ec 100644 (file)
@@ -2411,7 +2411,7 @@ class Parser
 
                # Get all headlines for numbering them and adding funky stuff like [edit]
                # links - this is for later, but we need the number of headlines right now
-               $numMatches = preg_match_all( '/<H([1-6])(.*?' . '>)(.*?)<\/H[1-6]>/i', $text, $matches );
+               $numMatches = preg_match_all( '/<H([1-6])(.*?'.'>)(.*?)<\/H[1-6] *>/i', $text, $matches );
 
                # if there are fewer than 4 headlines in the article, do not show TOC
                if( $numMatches < 4 ) {