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