Fix #785 : properly get out of a <pre> element :p
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 13 Jul 2005 15:17:28 +0000 (15:17 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 13 Jul 2005 15:17:28 +0000 (15:17 +0000)
RELEASE-NOTES
includes/Parser.php

index 6db852d..fda0cec 100644 (file)
@@ -568,6 +568,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * With $wgCapitalLinks off, accept off-by-first-letter-case in 'go' match
 * Optional parameters for [[Special:Listusers]]
 * (bug 2832) [[Special:Listadmins]] redirects to [[Special:Listusers/sysop]]
+* (bug 785) Parser did not get out of <pre> with list elements
 
 === Caveats ===
 
index 720c2da..b522524 100644 (file)
@@ -1753,9 +1753,6 @@ class Parser
                                if ( $openmatch or $closematch ) {
                                        $paragraphStack = false;
                                        $output .= $this->closeParagraph();
-                                       if($preOpenMatch and !$preCloseMatch) {
-                                               $this->mInPre = true;
-                                       }
                                        if ( $closematch ) {
                                                $inBlockElem = false;
                                        } else {
@@ -1800,6 +1797,10 @@ class Parser
                                }
                                wfProfileOut( "$fname-paragraph" );
                        }
+                       // somewhere above we forget to get out of pre block (bug 785)
+                       if($preCloseMatch && $this->mInPre) {
+                               $this->mInPre = false;
+                       }
                        if ($paragraphStack === false) {
                                $output .= $t."\n";
                        }