Skip to content

Preview task checkboxes remain disabled in current Comrak output #319

Description

@PathGao

Reproduced #148 in the current v2.6.14 macOS source build: an unsaved document containing - [ ] open task and - [x] completed task renders disabled checkboxes in split preview.

processTaskItems in src/lib/utils/markdown.ts now accepts a checkbox only when the input already has data-task-checkbox or the parent li has the task-list-item class. Current Comrak task-list HTML provides neither, so the routine never removes disabled or wires click handling.

Recognize the safe Comrak shape: a checkbox that is the first meaningful child of its list item, either directly or inside that list item’s first paragraph. Add a regression test using actual Comrak output and verify preview clicking changes the Markdown source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions