Skip to content

markdown_preview: Fix markdown tasklist not being shown#53699

Draft
AdamJedl wants to merge 1 commit intozed-industries:mainfrom
AdamJedl:fix-markdown-tasklists
Draft

markdown_preview: Fix markdown tasklist not being shown#53699
AdamJedl wants to merge 1 commit intozed-industries:mainfrom
AdamJedl:fix-markdown-tasklists

Conversation

@AdamJedl
Copy link
Copy Markdown
Contributor

Fixes a regression introduced in #52008

It's because pulldown-cmark may insert Paragraph between Item and TaskListMarker

example markdown:

- [x] a

- [ ] b

before:
image

after:
image

ParsedMarkdown
ParsedMarkdown {
    source: "- [x] a\n\n- [ ] b\n",
    events: [
        (
            0..17,
            RootStart,
        ),
        (
            0..17,
            Start(
                List(
                    None,
                ),
            ),
        ),
        (
            0..9,
            Start(
                Item,
            ),
        ),
        (
            6..8,
            Start(
                Paragraph,
            ),
        ),
        (
            2..5,
            TaskListMarker(
                true,
            ),
        ),
        (
            6..7,
            Text,
        ),
        (
            6..8,
            End(
                Paragraph,
            ),
        ),
        (
            0..9,
            End(
                Item,
            ),
        ),
        (
            9..17,
            Start(
                Item,
            ),
        ),
        (
            15..17,
            Start(
                Paragraph,
            ),
        ),
        (
            11..14,
            TaskListMarker(
                false,
            ),
        ),
        (
            15..16,
            Text,
        ),
        (
            15..17,
            End(
                Paragraph,
            ),
        ),
        (
            9..17,
             q
        (
            0..17,
            End(
                List(
                    false,
                ),
            ),
        ),
        (
            0..17,
            RootEnd(
                0,
            ),
        ),
    ],
    languages_by_name: {},
    languages_by_path: {},
    root_block_starts: [
        0,
    ],
    html_blocks: {},
    mermaid_diagrams: {},
}

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • Fixed markdown tasklist not being shown

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant