Commit a4fb0651 authored by Emanuil Rusev's avatar Emanuil Rusev
Browse files

resolve #27

parent 50a58eab
......@@ -678,13 +678,13 @@ class Parsedown
if (strpos($text, '_') !== FALSE)
$text = preg_replace('/__(?=\S)(.+?)(?<=\S)__/s', '<strong>$1</strong>', $text);
$text = preg_replace('/__(?=\S)(.+?)(?<=\S)__(?!_)/s', '<strong>$1</strong>', $text);
$text = preg_replace('/_(?=\S)(.+?)(?<=\S)_/s', '<em>$1</em>', $text);
if (strpos($text, '*') !== FALSE)
$text = preg_replace('/\*\*(?=\S)(.+?)(?<=\S)\*\*/s', '<strong>$1</strong>', $text);
$text = preg_replace('/\*\*(?=\S)(.+?)(?<=\S)\*\*(?!\*)/s', '<strong>$1</strong>', $text);
$text = preg_replace('/\*(?=\S)(.+?)(?<=\S)\*/s', '<em>$1</em>', $text);
<p><strong><em>em strong</em></strong></p>
<p><strong><em>one</em> at the start</strong></p>
<p><strong>one at the <em>end</em></strong></p>
<p><strong>one <em>in the</em> middle</strong></p>
<p><strong>one with <em>asterisks</em></strong></p>
\ No newline at end of file
___em strong___
___one_ at the start__
__one at the _end___
__one _in the_ middle__
**one with *asterisks***
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment