1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03: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
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

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(