sig fix II
authorGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 2 Jun 2004 01:22:29 +0000 (01:22 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 2 Jun 2004 01:22:29 +0000 (01:22 +0000)
includes/Parser.php

index 016b0d8..b59bb61 100644 (file)
@@ -1024,7 +1024,7 @@ class Parser
                        $lastPrefixLength = strlen( $lastPrefix );
                        $preOpenMatch = preg_match("/<pre/i", $oLine );
                        $preCloseMatch = preg_match("/<\\/pre/i", $oLine );
-                       $nowikiOpenMatch = preg_match("/( *)(.*?)<span class=\"nowiki\"/", $oLine, $nowikiOpenMatches );
+                       $nowikiOpenMatch = preg_match("/(.*|)<span class=\"nowiki\"/s", $oLine, $nowikiOpenMatches );
                        $nowikiCloseMatch = preg_match("/<\\/span  >/", $oLine );
                        if (!$this->mInPre) {
                                $this->mInPre = !empty($preOpenMatch);
@@ -1034,7 +1034,7 @@ class Parser
                        }
                        if ( 
                                !$this->mInPre && (!$this->mInNowiki || 
-                               $nowikiOpenMatch && !empty($nowikiOpenMatches[2]) && strlen($nowikiOpenMatches[2]) > 0 ) 
+                               ($nowikiOpenMatch && strlen($nowikiOpenMatches[1]) > 0) ) 
                        ) 
                        {
                                # Multiple prefixes may abut each other for nested lists.
@@ -1155,8 +1155,8 @@ class Parser
                                                }
                                        }
                                }
-                               if($nowikiCloseMatch) $this->mInNowiki = false;
                        }
+                       if($nowikiCloseMatch) $this->mInNowiki = false;
                        if ($paragraphStack === false) {
                                $output .= $t."\n";
                        }