mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
setext underlines should not work on interrupted paragraphs
This commit is contained in:
@@ -205,7 +205,7 @@ class Parsedown
|
||||
|
||||
# Setext Header (---)
|
||||
|
||||
if ($element['type'] === 'p' and preg_match('/^[-]+[ ]*$/', $line))
|
||||
if ($element['type'] === 'p' and ! isset($element['interrupted']) and preg_match('/^[-]+[ ]*$/', $line))
|
||||
{
|
||||
$element['type'] = 'h.';
|
||||
$element['level'] = 2;
|
||||
@@ -315,7 +315,7 @@ class Parsedown
|
||||
|
||||
# Setext Header (===)
|
||||
|
||||
if ($element['type'] === 'p' and preg_match('/^[=]+[ ]*$/', $line))
|
||||
if ($element['type'] === 'p' and ! isset($element['interrupted']) and preg_match('/^[=]+[ ]*$/', $line))
|
||||
{
|
||||
$element['type'] = 'h.';
|
||||
$element['level'] = 1;
|
||||
|
Reference in New Issue
Block a user