mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Merge pull request #586 from aidantwoods/fix/blockquote-adjacent
Fix merging of adjacent blockquotes
This commit is contained in:
commit
448b72a149
@ -698,15 +698,13 @@ class Parsedown
|
||||
|
||||
protected function blockQuoteContinue($Line, array $Block)
|
||||
{
|
||||
if (isset($Block['interrupted']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches))
|
||||
{
|
||||
if (isset($Block['interrupted']))
|
||||
{
|
||||
$Block['element']['text'] []= '';
|
||||
|
||||
unset($Block['interrupted']);
|
||||
}
|
||||
|
||||
$Block['element']['text'] []= $matches[1];
|
||||
|
||||
return $Block;
|
||||
|
@ -1,6 +1,8 @@
|
||||
<blockquote>
|
||||
<p>quote
|
||||
the rest of it</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p>another paragraph
|
||||
the rest of it</p>
|
||||
</blockquote>
|
@ -8,4 +8,19 @@
|
||||
<p>no space after <code>></code>:</p>
|
||||
<blockquote>
|
||||
<p>quote</p>
|
||||
</blockquote>
|
||||
<hr />
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<p>Info 1 text</p>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<p>Info 2 text</p>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
</blockquote>
|
@ -4,4 +4,10 @@ indented:
|
||||
> quote
|
||||
|
||||
no space after `>`:
|
||||
>quote
|
||||
>quote
|
||||
|
||||
---
|
||||
|
||||
>>> Info 1 text
|
||||
|
||||
>>> Info 2 text
|
Loading…
Reference in New Issue
Block a user