fix a problem by not inserting __MWTEMPLATESECTION for section titles that don't...
authorRiver Tarnell <kateturner@users.mediawiki.org>
Tue, 21 Sep 2004 18:15:37 +0000 (18:15 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Tue, 21 Sep 2004 18:15:37 +0000 (18:15 +0000)
includes/Parser.php

index 1b27441..8223bea 100644 (file)
@@ -1857,9 +1857,11 @@ class Parser
                                $text = '';
                                $nsec = 0;
                                for( $i = 0; $i < count($matches); $i += 2 ) {
+                                       wfDebug("text=[".$matches[$i]."] heading=[".$matches[$i+1]."]\n");
                                        if ($matches[$i] == "" && $matches[$i + 1] == "") break;
                                        $text .= $matches[$i];
                                        $hl = $matches[$i + 1];
+                                       if ($hl == "") continue;
                                        if( strstr($hl, "__MWTEMPLATESECTION") ) {
                                                $text .= $hl;
                                                continue;