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

Return state after block parse instead of mutating the instance copy

This commit is contained in:
Aidan Woods
2019-01-26 20:37:02 +00:00
parent b728f254b7
commit d6f526d80f
11 changed files with 47 additions and 36 deletions

View File

@@ -102,11 +102,14 @@ final class BlockQuote implements ContinuableBlock
return new Handler(
/** @return Element */
function (State $State) {
return new Element(
'blockquote',
[],
$State->applyTo((new Parsedown($State))->lines($this->Lines))
list($StateRenderables, $State) = Parsedown::lines(
$this->Lines,
$State
);
$Renderables = $State->applyTo($StateRenderables);
return new Element('blockquote', [], $Renderables);
}
);
}