1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

single line blockquotes should also go through "parse_lines"

This commit is contained in:
Emanuil 2013-09-18 19:53:44 +03:00
parent 238b1029c0
commit f13214cfa7

View File

@ -273,12 +273,10 @@ class Parsedown
if (isset($blockquote)) if (isset($blockquote))
{ {
$blockquote .= "\n".$matches[1]; $blockquote .= "\n".$matches[1];
$blockquote_is_multiline = true;
} }
else else
{ {
$blockquote = $matches[1]; $blockquote = $matches[1];
$blockquote_is_multiline = false;
} }
unset($line); unset($line);
@ -288,13 +286,10 @@ class Parsedown
if (isset($line) and $line === '') if (isset($line) and $line === '')
{ {
$blockquote .= "\n"; $blockquote .= "\n";
$blockquote_is_multiline = true;
} }
else else
{ {
$blockquote = $blockquote_is_multiline $blockquote = $this->parse_lines($blockquote);
? $this->parse_lines($blockquote)
: '<p>'.$this->parse_inline_elements($blockquote).'</p>'."\n";
$markup .= '<blockquote>'."\n".$blockquote.'</blockquote>'."\n"; $markup .= '<blockquote>'."\n".$blockquote.'</blockquote>'."\n";