r25291 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25290‎ | r25291 | r25292 >
Date:16:01, 29 August 2007
Author:brion
Status:old
Tags:
Comment:
Revert r25260; breaks several parser tests cases, seems to be borking up section IDs.
8 previously passing test(s) now FAILING! :(
* Basic section headings [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]
* Section headings with TOC [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]
* Handling of sections up to level 6 and beyond [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]
* TOC regression (bug 9764) [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]
* TOC with wgMaxTocLevel=3 (bug 6204) [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]
* Resolving duplicate section names [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]
* Fuzz testing: Parser14 [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]
* -{}- tags within headlines (within html for parserConvert()) [Introduced between 29-Aug-2007 15:27:48, 1.11alpha (r25250) and 29-Aug-2007 15:55:07, 1.11alpha (r25289)]

Sample:
--- /tmp/mwParser-557844546-expected 2007-08-29 15:55:46.000000000 +0000
+++ /tmp/mwParser-557844546-actual 2007-08-29 15:55:46.000000000 +0000
@@ -1,16 +1,16 @@
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
-<li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
+<li class="toclevel-1"><a href="#_Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
<ul>

etc
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -3641,20 +3641,12 @@
36423642 "\$this->mInterwikiLinkHolders['texts'][\$1]",
36433643 $canonized_headline );
36443644
3645 - # Strip out HTML (other than plain <sup> and <sub>: bug 8393)
3646 - $tocline = preg_replace(
3647 - array( '#<(?!/?(sup|sub)).*?'.'>#', '#<(/?(sup|sub)).*?'.'>#' ),
3648 - array( '', '<$1>'),
3649 - $canonized_headline
3650 - );
3651 - $tocline = trim( $tocline );
3652 -
3653 - # For the anchor, strip out HTML-y stuff period
3654 - $canonized_headline = preg_replace( '/<.*?'.'>/', '', $canonized_headline );
3655 -
 3645+ # strip out HTML
 3646+ $canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );
 3647+ $tocline = trim( $canonized_headline );
36563648 # Save headline for section edit hint before it's escaped
36573649 $headline_hint = trim( $canonized_headline );
3658 - $canonized_headline = Sanitizer::escapeId( $canonized_headline );
 3650+ $canonized_headline = Sanitizer::escapeId( $tocline );
36593651 $refers[$headlineCount] = $canonized_headline;
36603652
36613653 # count how many in assoc. array so we can track dupes in anchors
Index: trunk/phase3/RELEASE-NOTES
@@ -424,8 +424,6 @@
425425 * (bug 11072) Fix regression in API image history query
426426 * (bug 10985) Resolved cached entries on Special:DoubleRedirects were being
427427 supressed, breaking paging - now strikes out "fixed" results
428 -* (bug 8393) <sup> and <sub> need to be preserved (without attributes) for
429 - entries in the table of contents
430428
431429 == API changes since 1.10 ==
432430

Follow-up revisions

RevisionCommit summaryAuthorDate
r25303Merged revisions 25215-25302 via svnmerge from...david07:10, 30 August 2007
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
r21725* (bug 6204) Fixes for indentation with $wgMaxTocLevel:...brion19:51, 30 April 2007
r21810Add parser test for regression bug 9764brion18:45, 2 May 2007
r21829Revert r21725 (bug 6204) due to regressions (bug 9764). Will leave it to be w...brion17:14, 3 May 2007
r21833Parser test for bug #6204 : TOC not properly rendered when using $wgMaxTocLevelhashar17:49, 3 May 2007
r25250Update Germanraymond18:53, 28 August 2007
r25260(bug 8393) <sup> and <sub> need to be preserved (without attributes) for entr...simetrical00:06, 29 August 2007
r25289log_errors=ontstarling14:08, 29 August 2007

Status & tagging log