fix(markdown): preserve table cells during MDX fallback#5007
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
🦋 Changeset detectedLatest commit: e08b359 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 |
cb9ae4c to
bb2dbcf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb2dbcfbe3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
Addressed the three markdown fallback review findings in
Validation:
CI should restart on the pushed head. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8de8c24a1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
Addressed the latest markdown fallback review cases in e08b359:
Validation:
CI should restart on the pushed head. |
Summary
Fixes #5006.
When MDX parsing fails on plain less-than text inside a GFM table cell, the safe Markdown fallback now keeps the table structure valid instead of appending fallback inline text directly under the table node. If the incomplete MDX tail belongs to a table, the fallback replaces the partial table with the non-MDX parsed table while preserving completed blocks before it.
Testing
./node_modules/.bin/bun test packages/markdown/src/lib/table.spec.ts packages/markdown/src/lib/deserializer/utils/markdownToSlateNodesSafely.spec.tsx-> 7 passedPATH="$PWD/node_modules/.bin:$PATH" pnpm --filter @platejs/markdown lint-> passedpnpm turbo build --filter=./packages/markdown-> 11 tasks passed./node_modules/.bin/biome check packages/markdown/src/lib/deserializer/utils/markdownToSlateNodesSafely.ts packages/markdown/src/lib/table.spec.ts .changeset/green-plants-fix.md-> passedgit diff --check-> passedNotes
./node_modules/.bin/bun test packages/markdown/src/libreached 210 passing tests, then stopped on an existing local module-resolution issue for@platejs/list-classic/reactinstandardList.spec.tsx.pnpm turbo typecheck --filter=./packages/markdownalso fails in this checkout on existing unresolved local workspace/test imports such as@platejs/basic-nodes,@platejs/test-utils, and@platejs/table, not on this change.codex review --base origin/mainwas not run becausecodexis not installed in this environment.AI-assisted: yes. I understand the change and verified the focused regression locally.