fix(list): only assign listStart to ordered list items and resume numbering past unordered siblings#4954
Merged
zbeyens merged 7 commits intoudecode:mainfrom Apr 25, 2026
Conversation
…bering past unordered siblings normalizeListStart previously assigned and retained a listStart value on unordered list items (disc/circle/square). listStart is only semantically meaningful for ordered list styles, so the normalizer now: - Returns early for unordered list styles and strips any pre-existing listStart. - For ordered items, walks backward past same-indent siblings with a different listStyleType rather than aborting at them. An ordered list interrupted by bullets now resumes its sequential numbering against the preceding ordered item. Callers can still restore the prior lookup behavior by passing breakOnEqIndentNeqListStyleType: true or a custom query via options.
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 763b326 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Member
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…it spec
Under the new listStart semantic (only assigned to ordered list items),
the split output no longer carries listStart on the second disc heading.
The test's stated intent ('does not reset a heading list item') — that
type='h1', listStyleType='disc', and indent are preserved across the
split — remains fully asserted.
Integration tests in apps/www/ covering docx paste and li>ul nesting had listStart values on disc items as incidental normalizer output. Under the new listStart semantic (only assigned to ordered list items), these values are no longer produced. Test intent — preserved list nesting and attributes across docx/HTML import — is unchanged.
felixfeng33
approved these changes
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
normalizeListStart previously assigned and retained a listStart value on unordered list items (disc/circle/square). listStart is only semantically meaningful for ordered list styles, so the normalizer now:
Callers can still restore the prior lookup behavior by passing breakOnEqIndentNeqListStyleType: true or a custom query via options.
Checklist
pnpm typecheckpnpm lint:fixbun testpnpm brlpnpm changeset