Skip to content

fix(editor): keep emptied table cells blank - #608

Merged
murongg merged 1 commit into
v2from
fix/table-empty-cell-placeholder
Jul 30, 2026
Merged

fix(editor): keep emptied table cells blank#608
murongg merged 1 commit into
v2from
fix/table-empty-cell-placeholder

Conversation

@murongg

@murongg murongg commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • treat a lone browser-inserted <br> in an emptied visual table cell as a caret placeholder
  • keep the Markdown cell empty after deleting its final character
  • add a regression test for Backspace deletion in rendered tables

Why

Browsers retain a lone <br> node when the final character is deleted from a contenteditable cell. The visual table serializer previously wrote that placeholder back to Markdown, causing the cell to display the literal <br> text.

Validation

  • pnpm --filter @markra/editor test — 358 tests passed
  • pnpm --filter @markra/editor build — passed
  • pnpm --filter @markra/editor typecheck:test — passed

Risk

  • Low: the special case is limited to a lone <br> inside visual table cells, where real line breaks are already disabled.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview Jul 30, 2026 9:33am

@murongg
murongg merged commit cc18d50 into v2 Jul 30, 2026
21 checks passed
@murongg
murongg deleted the fix/table-empty-cell-placeholder branch July 30, 2026 09:35
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.

1 participant