Пример #1
0
 /**
  * Given a text already html-escaped which contains wiki links, convert them to html.
  * @param $text
  * @param $articlePath
  * @return string
  */
 public static function parseWikiLinks($text, $articlePath)
 {
     self::$articlePath = $articlePath;
     return preg_replace_callback('/\\[\\[:?([^]|]+)(?:\\|([^]]*))?\\]\\]/', 'self::parseWikiLinkArray', $text);
 }