fix(markdown): prevent task lists with links from corrupting DOM

Disables label wrapping in markdown-it-task-lists plugin configuration.
When enabled, markdown-it-task-lists wraps task list content in <label>
tags, which malforms HTML structure when items contain links on the
same line and swallows subsequent DOM elements.

Fixes #715
This commit is contained in:
nipunrajk committed 2026-09-26 16:10:32 +05:30
1 parent daae736907
commit 15c0435dde
2 files changed
+66 -1

No files matched your search

+1 -1
View File
@@ -674,7 +674,7 @@ export class MarkdownEditor {
.use(emoji) // Emoji: :smile: -> 😄
.use(ins) // Inserted text: ++text++ -> <ins>text</ins>
.use(mark) // Marked text: ==text== -> <mark>text</mark>
.use(taskLists, { enabled: true, label: true, labelAfter: true }) // Task lists: - [x] done
.use(taskLists, { enabled: true, label: false }) // Task lists: - [x] done
.use(anchor, { permalink: false }) // Header anchors
.use(tocDoneRight); // Table of contents: ${toc}
}