paragraph doesn't have to use a type

This commit is contained in:
Emanuil Rusev 2014-05-12 00:34:47 +03:00
parent b8d1cfe91a
commit 0820d0a607
1 changed files with 4 additions and 7 deletions

View File

@ -226,7 +226,7 @@ class Parsedown
# ~
if ($CurrentBlock['type'] === 'Paragraph' and ! isset($CurrentBlock['interrupted']))
if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted']))
{
$CurrentBlock['element']['text'] .= "\n".$text;
}
@ -236,10 +236,7 @@ class Parsedown
$CurrentBlock = $this->buildParagraph($Line);
$CurrentBlock += array(
'type' => 'Paragraph',
'identified' => true,
);
$CurrentBlock['identified'] = true;
}
}
@ -568,7 +565,7 @@ class Parsedown
protected function identifySetext($Line, array $Block = null)
{
if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
{
return;
}
@ -646,7 +643,7 @@ class Parsedown
protected function identifyTable($Line, array $Block = null)
{
if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
{
return;
}