mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-20 03:51:29 +02:00
Fix recovered spaces calculation
This commit is contained in:
parent
117912c373
commit
54f2c4eb4c
@ -45,7 +45,7 @@ final class BlockQuote implements ContinuableBlock
|
||||
|
||||
$recoveredSpaces = 0;
|
||||
if (\strlen($matches[1]) === 2 && \substr($matches[1], 1, 1) === "\t") {
|
||||
$recoveredSpaces = Line::tabShortage(2, $Context->line()->indentOffset() + $Context->line()->indent());
|
||||
$recoveredSpaces = Line::tabShortage(0, $indentOffset -1) -1;
|
||||
}
|
||||
|
||||
return new self(Lines::fromTextLines(
|
||||
@ -75,7 +75,7 @@ final class BlockQuote implements ContinuableBlock
|
||||
|
||||
$recoveredSpaces = 0;
|
||||
if (\strlen($matches[1]) === 2 && \substr($matches[1], 1, 1) === "\t") {
|
||||
$recoveredSpaces = Line::tabShortage(2, $Context->line()->indentOffset() + $Context->line()->indent());
|
||||
$recoveredSpaces = Line::tabShortage(0, $indentOffset -1) -1;
|
||||
}
|
||||
|
||||
$Lines = $this->Lines->appendingTextLines(
|
||||
|
@ -5,6 +5,15 @@
|
||||
<blockquote>
|
||||
<p>quote</p>
|
||||
</blockquote>
|
||||
<p>indented code in indented blockquote:</p>
|
||||
<blockquote>
|
||||
<pre><code>code
|
||||
</code></pre>
|
||||
</blockquote>
|
||||
<p>quote in indented blockquote:</p>
|
||||
<blockquote>
|
||||
<p>quote</p>
|
||||
</blockquote>
|
||||
<p>no space after <code>></code>:</p>
|
||||
<blockquote>
|
||||
<p>quote</p>
|
||||
|
@ -3,6 +3,12 @@
|
||||
indented:
|
||||
> quote
|
||||
|
||||
indented code in indented blockquote:
|
||||
> code
|
||||
|
||||
quote in indented blockquote:
|
||||
> quote
|
||||
|
||||
no space after `>`:
|
||||
>quote
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user