r38323 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38322‎ | r38323 | r38324 >
Date:00:22, 1 August 2008
Author:jhsoby
Status:old
Tags:
Comment:
Changing the code rendered for headers; removing <a name="$anchor">, making into <h# id="$anchor"> instead. This removes one line from the output code, but more importantly enables CSS marking of a title based on its id. Probably not backwards-compatible with browsers like IE4 (brion checked with IE5) and Netscape 4, but hey, who cares?
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -1488,7 +1488,7 @@
14891489 * @return string HTML headline
14901490 */
14911491 public function makeHeadline( $level, $attribs, $anchor, $text, $link ) {
1492 - return "<a name=\"$anchor\"></a><h$level$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
 1492+ return "<h$level id=\"$anchor\"$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
14931493 }
14941494
14951495 /**

Status & tagging log