diff options
Diffstat (limited to 'includes/installer/InstallDocFormatter.php')
-rw-r--r-- | includes/installer/InstallDocFormatter.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/includes/installer/InstallDocFormatter.php b/includes/installer/InstallDocFormatter.php index 9a389dd8..6d3819cd 100644 --- a/includes/installer/InstallDocFormatter.php +++ b/includes/installer/InstallDocFormatter.php @@ -1,6 +1,6 @@ <?php /** - * Installer-specific wikitext formating. + * Installer-specific wikitext formatting. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ class InstallDocFormatter { static function format( $text ) { $obj = new self( $text ); + return $obj->execute(); } @@ -33,8 +34,8 @@ class InstallDocFormatter { protected function execute() { $text = $this->text; // Use Unix line endings, escape some wikitext stuff - $text = str_replace( array( '<', '{{', '[[', "\r" ), - array( '<', '{{', '[[', '' ), $text ); + $text = str_replace( array( '<', '{{', '[[', '__', "\r" ), + array( '<', '{{', '[[', '__', '' ), $text ); // join word-wrapped lines into one do { $prev = $text; @@ -44,9 +45,14 @@ class InstallDocFormatter { $text = preg_replace( '/^\t\t/m', '::', $text ); $text = preg_replace( '/^\t/m', ':', $text ); // turn (bug nnnn) into links - $text = preg_replace_callback('/bug (\d+)/', array( $this, 'replaceBugLinks' ), $text ); + $text = preg_replace_callback( '/bug (\d+)/', array( $this, 'replaceBugLinks' ), $text ); // add links to manual to every global variable mentioned - $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', array( $this, 'replaceConfigLinks' ), $text ); + $text = preg_replace_callback( + '/(\$wg[a-z0-9_]+)/i', + array( $this, 'replaceConfigLinks' ), + $text + ); + return $text; } |