Skip to content

fix(markdown): preserve links, trailing breaks and table images - #5151

Closed
felixfeng33 wants to merge 1 commit into
nextfrom
codex/markdown-regression
Closed

felixfeng33 wants to merge 1 commit into
nextfrom
codex/markdown-regression

Conversation

@felixfeng33

@felixfeng33 felixfeng33 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator
  • Auto release

Plan: Markdown regression fixes

Why

Markdown export can fail for bare URLs in headings and sized images in table cells, or lose trailing breaks in paragraphs and list items. Fix the shared conversion rules so these documents survive export and import.

Scope

  • Correct HTML content classification and reuse paragraph encoding for list items, including CRLF and trailing breaks.
  • Preserve registered childless block tags in table cells, with a regression test for image width.
  • Update the existing package changeset, Markdown documentation and generated registry output. HTML/DOCX conversion and preview UI are unchanged.

Tradeoffs

Keep line-break handling in the paragraph encoder and tag handling in the existing converter. Avoid image-specific serialization and exported-string post-processing.

Blast Radius

The shared Markdown converter is affected. No public API or editor schema changes. Tags with child content are outside the new table behavior.

Verification

  • Markdown partition: 275 passed; list partition: 49 passed; slow CommonMark cases: 28 passed. Markdown typecheck and scoped lint passed.
  • Registry generation freshness and source checks passed after rebasing onto next.
  • Original development-page import/export replay covered all four fixes. Four saved downloads passed against the final parser. The PR panel found a CRLF regression; its new case failed before the producer fix and passed afterward, and the second round found no further issue.

Full repository checks, production builds and the browser engine matrix were not run. Browser replay predates the final classifier and CRLF cleanup.

@felixfeng33
felixfeng33 requested a review from a team October 8, 2026 14:42
@codesandbox

codesandbox Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web Editor • VS Code • Insiders

Open Preview

@changeset-bot

changeset-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e1fb012

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 1 package
Name Type
platejs Major

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@natamox natamox closed this Oct 8, 2026
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.

2 participants