Skip to content

fix(markdown-common): preserve non-default ordered list boundaries - #686

Open
YashAnand69 wants to merge 1 commit into
accordproject:mainfrom
YashAnand69:yashanand69/i313/ordered-list-boundaries
Open

YashAnand69 wants to merge 1 commit into
accordproject:mainfrom
YashAnand69:yashanand69/i313/ordered-list-boundaries

Conversation

@YashAnand69

Copy link
Copy Markdown

Closes #313

Changes

Roundtripping a paragraph followed by 5. First item drops the separating blank line. CommonMark then parses the numbered text as part of the paragraph, so the list disappears. Preserve that separator before the first item of an ordered list whose start is not 1. Default-start lists retain their existing output.

Added regressions for paragraph, blockquote and nested-list boundaries, zero/document-start lists and non-list numerals, plus a browser test through the public transform API.

Validation

  • Five AST roundtrip regressions and the browser regression fail on unchanged latest main.
  • Full workspace build and nine ESM smoke checks pass.
  • All eight workspace suites pass: 1,893 tests and 1,298 existing skips; configured lint and license checks pass.
  • All 11 Chromium browser tests pass, including the new roundtrip.
  • Package dry-run succeeds; no dependencies or public APIs changed.

Flags

Validation used Node 24.13.0 initially and was independently repeated on Node 24.19.0. Other browser engines were not exercised.

Codex assisted with investigation, implementation and regression tests; the full diff and validation results were independently reviewed.

Related Issues

Author Checklist

  • DCO sign-off provided on the commit, authorized by the contributor
  • Behavior covered by unit and browser regression tests
  • Commit follows Accord Project conventions
  • No public API documentation change needed
  • Contribution branch targets upstream main

Signed-off-by: Yash Anand <164618230+YashAnand69@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Roundtripping issue for ordered lists with a non-default initial index

1 participant