diff --git a/Parsedown.php b/Parsedown.php index 438e39e..2e61f0f 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -1218,12 +1218,12 @@ class Parsedown if ($this->breaksEnabled) { - $Inline['element']['rawHtml'] = preg_replace('/[ ]*\n/', "
\n", $safeText); + $Inline['element']['rawHtml'] = preg_replace('/[ ]*+\n/', "
\n", $safeText); $Inline['element']['allowRawHtmlInSafeMode'] = true; } else { - $Inline['element']['rawHtml'] = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $safeText); + $Inline['element']['rawHtml'] = preg_replace('/(?:[ ]*+\\\\|[ ]{2,}+)\n/', "
\n", $safeText); $Inline['element']['allowRawHtmlInSafeMode'] = true; }