diff --git a/Parsedown.php b/Parsedown.php index fc9533f..210e721 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -749,7 +749,9 @@ class Parsedown protected function blockRule($Line) { - if (preg_match('/^(['.$Line['text'][0].'])([ ]*+\1){2,}+[ ]*+$/', $Line['text'])) + $marker = $Line['text'][0]; + + if (substr_count($Line['text'], $marker) >= 3 and chop($Line['text'], " $marker") === '') { $Block = array( 'element' => array(