From: Antoine Musso Date: Wed, 13 Jul 2005 15:17:28 +0000 (+0000) Subject: Fix #785 : properly get out of a
 element :p
X-Git-Tag: 1.5.0beta4~144
X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=12dbb2267d0bed41790857fb189f26c053043746;p=lhc%2Fweb%2Fwiklou.git

Fix #785 : properly get out of a 
 element :p
---

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 6db852dbd7..fda0cec120 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -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 
 with list elements
 
 === Caveats ===
 
diff --git a/includes/Parser.php b/includes/Parser.php
index 720c2da874..b522524d0e 100644
--- a/includes/Parser.php
+++ b/includes/Parser.php
@@ -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";
 			}