special case: don't return an empty table, fixes test case
authorGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 24 Mar 2006 16:07:50 +0000 (16:07 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 24 Mar 2006 16:07:50 +0000 (16:07 +0000)
includes/Linker.php

index aa51a1f..23c8d01 100644 (file)
@@ -1013,7 +1013,9 @@ class Linker {
                   '<table id="toc" class="toc" summary="' . $title .'"><tr><td>'
                 . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
                 . $toc
-                . "</ul>\n</td></tr></table>\n"
+                # no trailing newline, script should not be wrapped in a
+                # paragraph
+                . "</ul>\n</td></tr></table>"
                 . '<script type="' . $wgJsMimeType . '">'
                 . ' if (window.showTocToggle) {'
                 . ' var tocShowText = "' . wfEscapeJsString( wfMsgForContent('showtoc') ) . '";'