$1', $text); $text = preg_replace('/\*\*(.+?)\*\*/s', '$1', $text); $text = preg_replace('/_([^_]+)_/', '$1', $text); $text = preg_replace('/\*([^\*]+)\*/', '$1', $text); $text = str_replace("\r\n", "\n", $text); $text = str_replace("\r", "\n", $text); $text = '

' . str_replace("\n\n", '

', $text) . '

'; $text = str_replace("\n", '
', $text); $text = preg_replace('/\[([^\]]+)]\(([-a-z0-9._~:\/?#@!$&\'()*+,;=%]+)\)/i','$1', $text); return $text; } function markdownout($text) { echo markdown2html($text); }