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:
parent
d2dd736e1b
commit
7e15d99d90
@ -749,7 +749,9 @@ class Parsedown
|
|||||||
|
|
||||||
protected function blockRule($Line)
|
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(
|
$Block = array(
|
||||||
'element' => array(
|
'element' => array(
|
||||||
|
Loading…
Reference in New Issue
Block a user