Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -3370,6 +3370,44 @@ |
3371 | 3371 | !! end |
3372 | 3372 | |
3373 | 3373 | !! test |
| 3374 | +TOC regression (bug 9764) |
| 3375 | +!! input |
| 3376 | +== title 1 == |
| 3377 | +=== title 1.1 === |
| 3378 | +==== title 1.1.1 ==== |
| 3379 | +=== title 1.2 === |
| 3380 | +== title 2 == |
| 3381 | +=== title 2.1 === |
| 3382 | +!! result |
| 3383 | +<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
| 3384 | +<ul> |
| 3385 | +<li class="toclevel-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a> |
| 3386 | +<ul> |
| 3387 | +<li class="toclevel-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a> |
| 3388 | +<ul> |
| 3389 | +<li class="toclevel-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li> |
| 3390 | +</ul> |
| 3391 | +</li> |
| 3392 | +<li class="toclevel-2"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li> |
| 3393 | +</ul> |
| 3394 | +</li> |
| 3395 | +<li class="toclevel-1"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a> |
| 3396 | +<ul> |
| 3397 | +<li class="toclevel-2"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li> |
| 3398 | +</ul> |
| 3399 | +</li> |
| 3400 | +</ul> |
| 3401 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 3402 | +<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> |
| 3403 | +<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> |
| 3404 | +<a name="title_1.1.1"></a><h4><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline"> title 1.1.1 </span></h4> |
| 3405 | +<a name="title_1.2"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a>]</span> <span class="mw-headline"> title 1.2 </span></h3> |
| 3406 | +<a name="title_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline"> title 2 </span></h2> |
| 3407 | +<a name="title_2.1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a>]</span> <span class="mw-headline"> title 2.1 </span></h3> |
| 3408 | + |
| 3409 | +!! end |
| 3410 | + |
| 3411 | +!! test |
3374 | 3412 | Resolving duplicate section names |
3375 | 3413 | !! input |
3376 | 3414 | == Foo bar == |