r63703 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63702‎ | r63703 | r63704 >
Date:19:43, 13 March 2010
Author:maxsem
Status:ok
Tags:
Comment:
Improved handling of indented links
Modified paths:
  • /branches/new-installer/phase3/includes/installer/WebInstaller.php (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/includes/installer/WebInstaller.php
@@ -1607,6 +1607,11 @@
16081608 $text = preg_replace_callback('/\(bug (\d+)\)/', array( 'WebInstaller_ReleaseNotes', 'replaceBugLinks' ), $text );
16091609 // add links to manual to every global variable mentioned
16101610 $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', array( 'WebInstaller_ReleaseNotes', 'replaceConfigLinks' ), $text );
 1611+ // special case for <pre> - formatted links
 1612+ do {
 1613+ $prev = $text;
 1614+ $text = preg_replace( '/^([^\\s].*?)\r?\n[\\s]+(https?:\/\/)/m', "\\1\n:\\2", $text );
 1615+ } while ( $text != $prev );
16111616 return $text;
16121617 }
16131618

Status & tagging log