示例#1
0
 /**
  * convert 
  * 
  * @param string $text 
  * @return string
  */
 public static function convert($text)
 {
     if (empty(self::$parser)) {
         self::$parser = new HyperDown();
         self::$parser->hook('afterParseCode', array('Markdown', 'transerCodeClass'));
         self::$parser->hook('beforeParseInline', array('Markdown', 'transerComment'));
     }
     return self::$parser->makeHtml($text);
 }