From 97f87817ead5b7a26e0dfc535cfd60ec0597d130 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Fri, 24 Jul 2026 02:07:16 +0530 Subject: [PATCH] feat(markdown): support GitHub-style task lists Renders `- [ ] task` syntax via `@mdit/plugin-tasklist`, enabled by default and configurable through the new `tasklist` markdown option (set to `false` to disable). The default theme hides list markers for task items and pulls checkboxes into the list gutter, GitHub-style. close #413 close #1923 close #3648 close #5110 Co-Authored-By: Claude Fable 5 --- __tests__/unit/node/markdown/markdown.test.ts | 29 +++++++++++++++++++ docs/en/guide/markdown.md | 14 +++++++++ package.json | 1 + pnpm-lock.yaml | 18 ++++++++++++ .../styles/components/vp-doc.css | 10 +++++++ src/node/markdown/markdown.ts | 13 +++++++++ 6 files changed, 85 insertions(+) diff --git a/__tests__/unit/node/markdown/markdown.test.ts b/__tests__/unit/node/markdown/markdown.test.ts index bb9a5ca7..11d338e5 100644 --- a/__tests__/unit/node/markdown/markdown.test.ts +++ b/__tests__/unit/node/markdown/markdown.test.ts @@ -42,6 +42,15 @@ describe('node/markdown/markdown', () => { expect(await render(':tada:', { emoji: false })).toContain(':tada:') }) + test('tasklist', async () => { + const src = '- [ ] todo' + expect(await render(src)).toContain(' { const src = '# Title\n\n[[toc]]' expect(await render(src)).toContain('table-of-contents') @@ -139,6 +148,26 @@ describe('node/markdown/markdown', () => { }) }) + describe('tasklist', () => { + test('renders checkboxes with their checked state', async () => { + const html = await render('- [ ] todo\n- [x] done') + expect(html).toContain('