public function markdownToText(string $markdown): string
    {
        if (empty($markdown)) {
            return '';
        }

        $pattern = array(
            '/(\.|)#/',
            '/(\.|)\*/',
            '/(\.|)~/'
        );

        return preg_replace($pattern, '', $markdown);
    }
public function markdownToText(string $markdown): string
    {
        if (empty($markdown)) {
            return '';
        }

        $pattern = array(
            '/(\.|)#/',
            '/(\.|)\*/',
            '/(\.|)~/'
        );

        return preg_replace($pattern, '', $markdown);
    }
public function markdownToText ( string $ markdown ) : string { if ( empty ( $ markdown ) ) { return '' ; } $ pattern = array ( '/(\.|)#/' , '/(\.|)\*/' , '/(\.|)~/' ) ; return preg_replace ( $ pattern , '' , $ markdown ) ; }
Strips the given text of the markdown but not '\n'.
@param string $markdown
@return string
Strips the given text of the markdown but not \ n .