1
0
mirror of https://github.com/erusev/parsedown.git synced 2025-09-02 19:32:35 +02:00

Remove regex from block rule

This commit is contained in:
Aidan Woods
2018-04-09 02:31:36 +01:00
parent d2dd736e1b
commit 7e15d99d90

View File

@@ -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(