Skip to content

fix: number ordered list items in sequence - #695

Merged
ocavue merged 3 commits into
masterfrom
fix/ordered-list-numbers
Oct 12, 2026
Merged

ocavue merged 3 commits into
masterfrom
fix/ordered-list-numbers

Conversation

@ocavuebot

Copy link
Copy Markdown
Collaborator

The editor showed an ordered list as 1, 2, 3, but the Markdown output wrote every new item as 1.. The serializer now takes the start number from the first item of a list and counts up, and the parser keeps order only on that first item, so a parse after a serialize gives the same tree. checkRoundTrip reports a renumbered list as normalizing.

Fixes #694

@github-actions

Copy link
Copy Markdown

@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@meowdown/core@695
npm i https://pkg.pr.new/@meowdown/embed@695
npm i https://pkg.pr.new/@meowdown/markdown@695
npm i https://pkg.pr.new/@meowdown/react@695

commit: a00b49d

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
meowdown Ignored Ignored Oct 12, 2026 12:13pm UTC

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 94.57% 5825 / 6159
🔵 Statements 92.4% 6580 / 7121
🔵 Functions 92.67% 1430 / 1543
🔵 Branches 88.73% 4522 / 5096
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/converters/sample-content.ts 100% 100% 100% 100%
packages/markdown/src/ast/check-roundtrip.ts 94.11% 86.66% 100% 93.93% 72, 81
packages/markdown/src/ast/parse.ts 97.82% 91.03% 100% 98.89% 303-306, 392, 405, 984, 993
packages/markdown/src/ast/serialize.ts 94.86% 92.32% 100% 96.63% 82, 180, 234-235, 264-268, 284, 324-325, 418-419, 438, 449, 486, 578, 635, 697, 763, 897, 983
packages/markdown/src/ast/types.ts 0% 0% 0% 0%
Generated in workflow #2748 for commit a00b49d by the Vitest Coverage Report Action

@ocavue
ocavue marked this pull request as ready for review October 12, 2026 12:34
@ocavue
ocavue merged commit ab56a0b into master Oct 12, 2026
14 checks passed
@ocavue
ocavue deleted the fix/ordered-list-numbers branch October 12, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ordered list items are written with the wrong numbers

2 participants