dispatchUser() should use a 302 http status code
[lhc/web/wiklou.git] / includes / parser / BlockLevelPass.php
index acdc652..1173dd2 100644 (file)
@@ -306,8 +306,12 @@ class BlockLevelPass {
 
                                if ( $openMatch || $closeMatch ) {
                                        $pendingPTag = false;
-                                       # @todo T7718: paragraph closed
-                                       $output .= $this->closeParagraph();
+                                       // Only close the paragraph if we're not inside a <pre> tag, or if
+                                       // that <pre> tag has just been opened
+                                       if ( !$this->inPre || $preOpenMatch ) {
+                                               // @todo T7718: paragraph closed
+                                               $output .= $this->closeParagraph();
+                                       }
                                        if ( $preOpenMatch && !$preCloseMatch ) {
                                                $this->inPre = true;
                                        }