1
0
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:
Emanuil
2013-09-24 22:36:24 +03:00
parent 47b1789430
commit b9808f23e0
5 changed files with 19 additions and 9 deletions

View File

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