#6330·astryx

[Markdown] Mixed task/bullet lists are flattened to plain bullets

Author: yosefadiCreated Sep 15, 2026Updated Sep 15, 2026

Describe the bug

Markdown flattens mixed task/bullet lists to bullets — GitHub renders per-item.

Repro (0.5.2, 0.6.1 same):

typescript
import { Markdown } from "@astryxdesign/core/Markdown";

<Markdown>{"- [ ] a\n- b\n- [x] c"}</Markdown>
// Expected (GitHub): checkbox "a", bullet "b", checkbox "c" (checked)
// Actual: three bullets "a", "b", "c" — no checkboxes, no checked state

Other minimal repros, all flattened:

markdown
- [ ] a
- [x] b

- c
- d
markdown
- outer
  - [x] nested task
markdown
- [ ] outer
  - nested plain
  - [x] nested task

Root cause: Markdown parses a list block correctly, but then isTaskList = items.every(item => item.checked != null) treats the whole block as a task list only if every item has a checkbox. A mixed block fails the check and falls back to a plain List, losing all task state. GitHub (and CommonMark) render per-item.

Suggested direction: render per-item — task items as read-only checkboxes with aria-label, plain items as bullets/numbers — ideally in one list so order and nesting are preserved. This is a behavior change, so filing as an issue first per CONTRIBUTING's discussion guidance; happy to PR it if the direction is accepted.

Workaround in consumer: the app now splits task-containing blocks into runs and renders mixed blocks as adjacent CheckboxList/List runs, which is visually correct but a workaround to be deleted when upstream renders per-item.