From b73fe2e9ec0e4fa5facea50c1782f7406cdc961d Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Wed, 13 Oct 2021 19:50:47 +0100 Subject: [PATCH] Apply correct state --- src/Parsedown.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Parsedown.php b/src/Parsedown.php index b5046b9..2697089 100644 --- a/src/Parsedown.php +++ b/src/Parsedown.php @@ -52,8 +52,8 @@ final class Parsedown * @param \Closure(Renderable[],State):Renderable[] $RenderMap * @return Renderable[] */ - function (array $Renderables, \Closure $RenderMap): array { - return $RenderMap($Renderables, $this->State); + function (array $Renderables, \Closure $RenderMap) use ($State): array { + return $RenderMap($Renderables, $State); }, $State->applyTo($StateRenderables) );