Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -3605,7 +3605,30 @@ |
3606 | 3606 | |
3607 | 3607 | !! end |
3608 | 3608 | |
| 3609 | +!! test |
| 3610 | +TOC regression (bug 12077) |
| 3611 | +!! input |
| 3612 | +__TOC__ |
| 3613 | +== title 1 == |
| 3614 | +=== title 1.1 === |
| 3615 | +== title 2 == |
| 3616 | +!! result |
| 3617 | +<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
| 3618 | +<ul> |
| 3619 | +<li class="toclevel-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a> |
| 3620 | +<ul> |
| 3621 | +<li class="toclevel-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li> |
| 3622 | +</ul> |
| 3623 | +</li> |
| 3624 | +<li class="toclevel-1"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li> |
| 3625 | +</ul> |
| 3626 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 3627 | +<a name="title_1"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline"> title 1 </span></h2> |
| 3628 | +<a name="title_1.1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline"> title 1.1 </span></h3> |
| 3629 | +<a name="title_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline"> title 2 </span></h2> |
3609 | 3630 | |
| 3631 | +!! end |
| 3632 | + |
3610 | 3633 | !! test |
3611 | 3634 | BUG 1219 URL next to image (good) |
3612 | 3635 | !! input |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -3437,6 +3437,7 @@ |
3438 | 3438 | if($prevtoclevel < $wgMaxTocLevel) { |
3439 | 3439 | # Unindent only if the previous toc level was shown :p |
3440 | 3440 | $toc .= $sk->tocUnindent( $prevtoclevel - $toclevel ); |
| 3441 | + $prevtoclevel = $toclevel; |
3441 | 3442 | } else { |
3442 | 3443 | $toc .= $sk->tocLineEnd(); |
3443 | 3444 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -128,6 +128,7 @@ |
129 | 129 | * (bug 11874) Inline CSS with !important no longer borken |
130 | 130 | * (bug 1600) Strip extra == section markup == in new-comment field |
131 | 131 | * (bug 11325) Wrapped page titles in MonoBook skin spaced more nicely |
| 132 | +* (bug 12077) Fix HTML nesting for TOC |
132 | 133 | |
133 | 134 | |
134 | 135 | === API changes in 1.13 === |