예제 #1
0
 public function convert()
 {
     require_once AK_VENDOR_DIR . DS . 'TextParsers' . DS . 'html2text.php';
     $Converter = new html2text(true, 0, false);
     $markdown = str_replace('__AK:AMP__', '&', $Converter->load_string(str_replace('&', '__AK:AMP__', $this->source)));
     require_once AK_VENDOR_DIR . DS . 'TextParsers' . DS . 'smartypants.php';
     $Smartypants = new SmartyPantsTypographer_Parser();
     $markdown = Ak::html_entity_decode(strip_tags($Smartypants->transform($markdown)));
     return trim($this->_simplifyMarkdown($markdown));
 }
예제 #2
0
 function convert()
 {
     require_once AK_VENDOR_DIR . DS . 'TextParsers' . DS . 'html2text.php';
     $Converter = new html2text(true, 0, false);
     return $Converter->load_string($this->source);
 }