Fix images not rendering after comment in source mode (#87)

This commit is contained in:
Yuri Karamian
2026-06-19 12:03:49 +02:00
parent 2e8c048a3e
commit a0b1fa0481
+1 -1
View File
@@ -3283,7 +3283,7 @@
// Pre-process: strip list-separator comments before markdown-it. // Pre-process: strip list-separator comments before markdown-it.
// markdown-it treats <!-- --> as an HTML block start, swallowing the // markdown-it treats <!-- --> as an HTML block start, swallowing the
// next line (e.g. an image) as raw HTML instead of parsing it. // next line (e.g. an image) as raw HTML instead of parsing it.
src = src.replace(/^<!-- -->\s*$/gm, ''); src = src.replace(/<!-- -->/g, '');
// Pre-process: preserve blank lines before image-only lines // Pre-process: preserve blank lines before image-only lines
// markdown-it collapses blank lines into paragraph breaks, losing the empty paragraph. // markdown-it collapses blank lines into paragraph breaks, losing the empty paragraph.