From 2e8c048a3ea4937f7b2217f6859a40b88276db06 Mon Sep 17 00:00:00 2001 From: Yuri Karamian Date: Fri, 19 Jun 2026 12:01:13 +0200 Subject: [PATCH] Fix images not rendering after <- Client-side Create New Pull Zone button for allowed --> comment in source mode (#87) --- src/lib/components/Editor.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/components/Editor.svelte b/src/lib/components/Editor.svelte index 4fd22dc..b1755d5 100644 --- a/src/lib/components/Editor.svelte +++ b/src/lib/components/Editor.svelte @@ -3280,6 +3280,11 @@ src = src.replace(/^([\s>]*)-\s\[ \][^\S\n]+(.+)$/gm, '$1- $2'); src = src.replace(/^([\s>]*)-\s\[ \][^\S\n]*$/gm, '$1-  '); + // Pre-process: strip list-separator comments before markdown-it. + // markdown-it treats as an HTML block start, swallowing the + // next line (e.g. an image) as raw HTML instead of parsing it. + src = src.replace(/^\s*$/gm, ''); + // Pre-process: preserve blank lines before image-only lines // markdown-it collapses blank lines into paragraph breaks, losing the empty paragraph. // Insert a
marker that markdown-it passes through (html: true), then convert to