module/Core/src/Grid/Core/View/Helper/Markdown.php
public function transform( $text, $options = null )
    {
        if ( null !== $options )
        {
            $this->setOptions( $options );
        }

        $parser = $this->extraEnabled
                ? new MarkdownExtraParser
                : new MarkdownParser;
        $parsed = $parser->transformMarkdown( $text );

        if ( ! empty( $this->linkTarget ) )
        {
            $parsed = preg_replace(
                '#<(a|form)((\s[^>]*)?)>(.*?)</\\1>#',
                '<$1 target="' . htmlspecialchars( $this->linkTarget ) . '"$2>$4</$1>',
                $parsed
            );
        }

        if ( $this->stripScripts )
        {
            $parsed = preg_replace(
                '#<script(\s[^>]*)?>.*?</script>#',
                '',
                $parsed
            );
        }

        return $parsed;
    }
public function transform( $text, $options = null )
    {
        if ( null !== $options )
        {
            $this->setOptions( $options );
        }

        $parser = $this->extraEnabled
                ? new MarkdownExtraParser
                : new MarkdownParser;
        $parsed = $parser->transformMarkdown( $text );

        if ( ! empty( $this->linkTarget ) )
        {
            $parsed = preg_replace(
                '#<(a|form)((\s[^>]*)?)>(.*?)</\\1>#',
                '<$1 target="' . htmlspecialchars( $this->linkTarget ) . '"$2>$4</$1>',
                $parsed
            );
        }

        if ( $this->stripScripts )
        {
            $parsed = preg_replace(
                '#<script(\s[^>]*)?>.*?</script>#',
                '',
                $parsed
            );
        }

        return $parsed;
    }
public function transform ( $ text , $ options = null ) { if ( null !== $ options ) { $ this -> setOptions ( $ options ) ; } $ parser = $ this -> extraEnabled ? new MarkdownExtraParser : new MarkdownParser ; $ parsed = $ parser -> transformMarkdown ( $ text ) ; if ( ! empty ( $ this -> linkTarget ) ) { $ parsed = preg_replace ( '#<(a|form)((\s[^>]*)?)>(.*?)</\\1>#' , '<$1 target="' . htmlspecialchars ( $ this -> linkTarget ) . '"$2>$4</$1>' , $ parsed ) ; } if ( $ this -> stripScripts ) { $ parsed = preg_replace ( '#<script(\s[^>]*)?>.*?</script>#' , '' , $ parsed ) ; } return $ parsed ; }
Transform text from markdown to html

@param   string  $text
@param   array   $options
@return  string
Transform text from markdown to html