Beispiel #1
0
 /**
  * convert 
  * 
  * @param string $text 
  * @return string
  */
 public static function convert($text)
 {
     static $parser;
     if (empty($parser)) {
         $parser = new HyperDown();
     }
     return $parser->makeHtml($text);
 }
Beispiel #2
0
 /**
  * convert 
  * 
  * @param string $text 
  * @return string
  */
 public static function convert($text)
 {
     static $parser;
     if (empty($parser)) {
         $parser = new HyperDown();
         $parser->hook('afterParseCode', array('Markdown', 'transerCodeClass'));
     }
     return $parser->makeHtml($text);
 }
Beispiel #3
0
 /**
  * @param $matches
  * @return string
  */
 public static function transerCommentCallback($matches)
 {
     return self::$parser->makeHolder($matches[0]);
 }