r32998 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32997‎ | r32998 | r32999 >
Date:23:48, 8 April 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 12077) Fix HTML nesting for TOC
Copy r32387 from trunk
Modified paths:
  • /branches/REL1_12/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_12/phase3/includes/Parser.php (modified) (history)
  • /branches/REL1_12/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: branches/REL1_12/phase3/maintenance/parserTests.txt
@@ -3594,7 +3594,30 @@
35953595
35963596 !! end
35973597
 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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;section=3" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline"> title 2 </span></h2>
35983619
 3620+!! end
 3621+
35993622 !! test
36003623 BUG 1219 URL next to image (good)
36013624 !! input
Index: branches/REL1_12/phase3/includes/Parser.php
@@ -3476,6 +3476,7 @@
34773477 if($prevtoclevel < $wgMaxTocLevel) {
34783478 # Unindent only if the previous toc level was shown :p
34793479 $toc .= $sk->tocUnindent( $prevtoclevel - $toclevel );
 3480+ $prevtoclevel = $toclevel;
34803481 } else {
34813482 $toc .= $sk->tocLineEnd();
34823483 }
Index: branches/REL1_12/phase3/RELEASE-NOTES
@@ -9,6 +9,7 @@
1010 Changes since 1.12.0:
1111
1212 * (bug 13522) Fix fatal error in Parser::extractTagsAndParams
 13+* (bug 12077) Fix HTML nesting for TOC
1314
1415
1516 == MediaWiki 1.12.0 ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r38208Revert r38196, r38204 -- "(bugs 6089, 13079) Show edit section links for tran...brion23:56, 29 July 2008
r53308Fix parser tests for r52213....catrope11:29, 15 July 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32387* (bug 12077) Fix HTML nesting for TOC...brion23:33, 24 March 2008

Status & tagging log