public processText ( $text ) : string | ||
return | string | the processed text result |
public function processText($text)
{
$result = Parsedown::instance()->parse($text);
return preg_replace_callback('/<pre><code class="language-(\\w+)">((.|\\n)*?)<\\/code><\\/pre>/im', array($this, 'highlightCode'), $result);
}