Go to the documentation of this file.
30 public static function format( $text ) {
31 return (
new self( $text ) )->execute();
41 $text = str_replace( [
'<',
'{{',
'[[',
'__',
"\r" ],
42 [
'<',
'{{',
'[[',
'__',
'' ], $text );
46 $text = preg_replace(
"/\n([\\*#\t])([^\n]*?)\n([^\n#\\*:]+)/",
"\n\\1\\2 \\3", $text );
47 }
while ( $text != $prev );
49 $text = preg_replace(
'/^\t\t/m',
'::', $text );
50 $text = preg_replace(
'/^\t/m',
':', $text );
52 $linkStart =
'<span class="config-plainlink">[';
53 $linkEnd =
' $0]</span>';
58 "{$linkStart}https://phabricator.wikimedia.org/$0{$linkEnd}",
65 "{$linkStart}https://bugzilla.wikimedia.org/$1{$linkEnd}",
72 "{$linkStart}https://www.mediawiki.org/wiki/Manual:$0{$linkEnd}",