Пример #1
0
 public function toHTML($text)
 {
     $text = $this->preTransformText($text);
     $text = MarkdownExtra::defaultTransform($text);
     $text = SmartyPants::defaultTransform($text);
     return $this->postTransformText($text);
 }
Пример #2
0
 public static function renderContent($content)
 {
     // check again because page config
     if (!empty(static::$config['process_content'])) {
         return SmartyPants::defaultTransform($content, static::$config['options']);
     }
     return $content;
 }
Пример #3
0
 protected function processEscapes($_)
 {
     #
     #   Adding a few more escapes to SmartyPants's escapes:
     #
     #               Escape  Value
     #               ------  -----
     #               \,      ,
     #               \<      &#60;
     #               \>      &#62;
     #
     $_ = parent::processEscapes($_);
     $_ = str_replace(array('\\,', '\\<', '\\>', '\\&lt;', '\\&gt;'), array('&#44;', '&#60;', '&#62;', '&#60;', '&#62;'), $_);
     return $_;
 }