r44896 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44895‎ | r44896 | r44897 >
Date:11:45, 22 December 2008
Author:vyznev
Status:resolved (Comments)
Tags:
Comment:
Add "id" attribute to section anchors, per discussion on wikitech-l.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -1519,7 +1519,7 @@
15201520 * @return string HTML headline
15211521 */
15221522 public function makeHeadline( $level, $attribs, $anchor, $text, $link ) {
1523 - return "<a name=\"$anchor\"></a><h$level$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
 1523+ return "<a name=\"$anchor\" id=\"$anchor\"></a><h$level$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
15241524 }
15251525
15261526 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -436,6 +436,8 @@
437437 * (bug 16712) Special:NewFiles updated to use "newer"/"older" paging messages
438438 for clarity over "previous/next"
439439 * (bug 16612) Fixed "noprint" class for Modern skin print style
 440+* Section anchors now have an "id" attribute as well as a "name" attribute,
 441+ even when Tidy is not used
440442
441443 === API changes in 1.14 ===
442444

Follow-up revisions

RevisionCommit summaryAuthorDate
r44927Fix tests after r44896: s/<a name="([^"]+)"><\/a>/<a name="$1" id="$1"><\/a>/gvyznev11:26, 23 December 2008
r45021* reverting r44896 - it causes massive invalidity of pages. See http://www.w3...danny_b12:11, 25 December 2008
r45023* reverting r44896 because of r45021danny_b12:40, 25 December 2008
r45044Revert r45021, r45022, r45023 -- restoring r44896, r44927, r44896 -- pending ...brion05:28, 26 December 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   17:43, 22 December 2008

21 previously passing test(s) now FAILING! :(

  • Bug 6563: Edit link generation for section shown by <lt;includeonly> [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Bug 6563: Edit link generation for section suppressed by <lt;includeonly> [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Basic section headings [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Section headings with TOC [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Handling of sections up to level 6 and beyond [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • TOC regression (bug 9764) [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • TOC with wgMaxTocLevel=3 (bug 6204) [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Resolving duplicate section names [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Resolving duplicate section names with differing case (bug 10721) [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Template with sections, [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • keyword [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Link inside a section heading [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • TOC regression (bug 12077) [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Fuzz testing: Parser14 [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Fuzz testing: Parser14-table [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Inclusion of !userCanEdit() content [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Out-of-order TOC heading levels [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • -{}- tags within headlines (within html for parserConvert()) [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • Morwen/13: Unclosed link followed by heading [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • HHP2.1: Heuristics for headings in preprocessor parenthetical structures [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
  • HHP2.2: Heuristics for headings in preprocessor parenthetical structures [Introduced between 19-Dec-2008 01:44:11, 1.14alpha (r44790) and 22-Dec-2008 17:38:33, 1.14alpha (r44901)]
#Comment by Ilmari Karonen (talk | contribs)   11:38, 23 December 2008

Should be fixed by r44927. However, I can't be entirely sure, since most of those tests (all but two, in fact) have never passed for me. Here's what I currently get:

$ php maintenance/parserTests.php --quick --quiet --compare
This is MediaWiki version 1.14alpha (r44927).

Reading tests from "maintenance/parserTests.txt"...
Reading tests from "extensions/ParserFunctions/funcsParserTests.txt"...

34 still FAILING test(s) :(

  • Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html) [Has never passed]
  • Link containing double-single-quotes '' (bug 4598) [Has never passed]
  • Bug 6563: Edit link generation for section shown by <includeonly> [Has never passed]
  • Bug 6563: Edit link generation for section suppressed by <includeonly> [Has never passed]
  • BUG 1887, part 2: A <math> with a thumbnail- math enabled [Has never passed]
  • Basic section headings [Has never passed]
  • Section headings with TOC [Has never passed]
  • Handling of sections up to level 6 and beyond [Has never passed]
  • TOC regression (bug 9764) [Has never passed]
  • TOC with wgMaxTocLevel=3 (bug 6204) [Has never passed]
  • Resolving duplicate section names [Has never passed]
  • Resolving duplicate section names with differing case (bug 10721) [Has never passed]
  • Template with sections, [Has never passed]
  • Link inside a section heading [Has never passed]
  • TOC regression (bug 12077) [Has never passed]
  • HTML bullet list, unclosed tags (bug 5497) [Has never passed]
  • HTML ordered list, unclosed tags (bug 5497) [Has never passed]
  • HTML nested bullet list, open tags (bug 5497) [Has never passed]
  • HTML nested ordered list, open tags (bug 5497) [Has never passed]
  • Fuzz testing: Parser14 [Has never passed]
  • Fuzz testing: Parser14-table [Has never passed]
  • Inline HTML vs wiki block nesting [Has never passed]
  • dt/dd/dl test [Has never passed]
  • Images with the "|" character in the comment [Has never passed]
  • Inclusion of !userCanEdit() content [Has never passed]
  • Out-of-order TOC heading levels [Has never passed]
  • -{}- tags within headlines (within html for parserConvert()) [Has never passed]
  • Morwen/13: Unclosed link followed by heading [Has never passed]
  • HHP2.2: Heuristics for headings in preprocessor parenthetical structures [Has never passed]
  • Bug 6200: paragraphs inside blockquotes (no extra line breaks) [Has never passed]
  • Bug 6200: paragraphs inside blockquotes (extra line break on open) [Has never passed]
  • Bug 6200: paragraphs inside blockquotes (extra line break on close) [Has never passed]
  • Bug 6200: paragraphs inside blockquotes (extra line break on open and close) [Has never passed]
  • Input times should probably be UTC, not local time [Has never passed]

Passed 517 of 551 tests (93.83%)... 34 tests failed!

#Comment by Ilmari Karonen (talk | contribs)   12:01, 23 December 2008

Aha, figured it out, I think: it's because I had anon editing disabled on my test wiki. Filed as bug 16769. With anon editing temporarily enabled, all the tests you listed above now pass for me.

#Comment by Danny B. (talk | contribs)   12:44, 25 December 2008

Reverted in r45021 & r45023

Status & tagging log