From 7a369a73434a674f353557b985b70938dc4093a7 Mon Sep 17 00:00:00 2001 From: Lukas Frey Date: Tue, 28 May 2024 11:55:03 +0200 Subject: [PATCH] fix: Vite assets on production Signed-off-by: Lukas Frey --- src/Markdown/Renderers/ImageRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Markdown/Renderers/ImageRenderer.php b/src/Markdown/Renderers/ImageRenderer.php index 17abb65..37e79f1 100644 --- a/src/Markdown/Renderers/ImageRenderer.php +++ b/src/Markdown/Renderers/ImageRenderer.php @@ -41,7 +41,7 @@ public function render(Node $node, ChildNodeRendererInterface $childRenderer): \ } else { $attrs['src'] = Str::startsWith($url = $node->getUrl(), ['http://', 'https://']) ? $url - : Vite::asset($url); + : Vite::asset(str($url)->ltrim('/')->toString()); } $attrs['alt'] = $this->getAltText($node);