Index: branches/REL1_12/phase3/maintenance/parserTests.txt |
— | — | @@ -3594,7 +3594,30 @@ |
3595 | 3595 | |
3596 | 3596 | !! end |
3597 | 3597 | |
| 3598 | +!! test |
| 3599 | +TOC regression (bug 12077) |
| 3600 | +!! input |
| 3601 | +__TOC__ |
| 3602 | +== title 1 == |
| 3603 | +=== title 1.1 === |
| 3604 | +== title 2 == |
| 3605 | +!! result |
| 3606 | +<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
| 3607 | +<ul> |
| 3608 | +<li class="toclevel-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a> |
| 3609 | +<ul> |
| 3610 | +<li class="toclevel-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li> |
| 3611 | +</ul> |
| 3612 | +</li> |
| 3613 | +<li class="toclevel-1"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li> |
| 3614 | +</ul> |
| 3615 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 3616 | +<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> |
| 3617 | +<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> |
| 3618 | +<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> |
3598 | 3619 | |
| 3620 | +!! end |
| 3621 | + |
3599 | 3622 | !! test |
3600 | 3623 | BUG 1219 URL next to image (good) |
3601 | 3624 | !! input |
Index: branches/REL1_12/phase3/includes/Parser.php |
— | — | @@ -3476,6 +3476,7 @@ |
3477 | 3477 | if($prevtoclevel < $wgMaxTocLevel) { |
3478 | 3478 | # Unindent only if the previous toc level was shown :p |
3479 | 3479 | $toc .= $sk->tocUnindent( $prevtoclevel - $toclevel ); |
| 3480 | + $prevtoclevel = $toclevel; |
3480 | 3481 | } else { |
3481 | 3482 | $toc .= $sk->tocLineEnd(); |
3482 | 3483 | } |
Index: branches/REL1_12/phase3/RELEASE-NOTES |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | Changes since 1.12.0: |
11 | 11 | |
12 | 12 | * (bug 13522) Fix fatal error in Parser::extractTagsAndParams |
| 13 | +* (bug 12077) Fix HTML nesting for TOC |
13 | 14 | |
14 | 15 | |
15 | 16 | == MediaWiki 1.12.0 == |