mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-20 03:51:29 +02: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)
|
protected function blockQuoteContinue($Line, array $Block)
|
||||||
{
|
{
|
||||||
|
if (isset($Block['interrupted']))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches))
|
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];
|
$Block['element']['text'] []= $matches[1];
|
||||||
|
|
||||||
return $Block;
|
return $Block;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<blockquote>
|
<blockquote>
|
||||||
<p>quote
|
<p>quote
|
||||||
the rest of it</p>
|
the rest of it</p>
|
||||||
|
</blockquote>
|
||||||
|
<blockquote>
|
||||||
<p>another paragraph
|
<p>another paragraph
|
||||||
the rest of it</p>
|
the rest of it</p>
|
||||||
</blockquote>
|
</blockquote>
|
@ -9,3 +9,18 @@
|
|||||||
<blockquote>
|
<blockquote>
|
||||||
<p>quote</p>
|
<p>quote</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
<hr />
|
||||||
|
<blockquote>
|
||||||
|
<blockquote>
|
||||||
|
<blockquote>
|
||||||
|
<p>Info 1 text</p>
|
||||||
|
</blockquote>
|
||||||
|
</blockquote>
|
||||||
|
</blockquote>
|
||||||
|
<blockquote>
|
||||||
|
<blockquote>
|
||||||
|
<blockquote>
|
||||||
|
<p>Info 2 text</p>
|
||||||
|
</blockquote>
|
||||||
|
</blockquote>
|
||||||
|
</blockquote>
|
@ -5,3 +5,9 @@ indented:
|
|||||||
|
|
||||||
no space after `>`:
|
no space after `>`:
|
||||||
>quote
|
>quote
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
>>> Info 1 text
|
||||||
|
|
||||||
|
>>> Info 2 text
|
Loading…
Reference in New Issue
Block a user