Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 3
0
 /**
  * @param $matches
  * @return string
  */
 public static function transerCommentCallback($matches)
 {
     return self::$parser->makeHolder($matches[0]);
 }