public function render($text)
    {
        $text = trim(str_replace(array("\r\n", "\r"), "\n", $text), "\n");

        foreach ($this->rules as $regex => $replacement) {
            if (is_callable($replacement)) {
                $text = preg_replace_callback($regex, $replacement, $text);
            } else {
                $text = preg_replace($regex, $replacement, $text);
            }
        }

        return trim($text);
    }
public function render($text)
    {
        $text = trim(str_replace(array("\r\n", "\r"), "\n", $text), "\n");

        foreach ($this->rules as $regex => $replacement) {
            if (is_callable($replacement)) {
                $text = preg_replace_callback($regex, $replacement, $text);
            } else {
                $text = preg_replace($regex, $replacement, $text);
            }
        }

        return trim($text);
    }
public function render ( $ text ) { $ text = trim ( str_replace ( array ( "\r\n" , "\r" ) , "\n" , $ text ) , "\n" ) ; foreach ( $ this -> rules as $ regex => $ replacement ) { if ( is_callable ( $ replacement ) ) { $ text = preg_replace_callback ( $ regex , $ replacement , $ text ) ; } else { $ text = preg_replace ( $ regex , $ replacement , $ text ) ; } } return trim ( $ text ) ; }
Renders Markdown text into HTML
@param string $text
@return string
Renders Markdown text into HTML