Skip to content

Fix markdown table parsing, selection, and empty cell rendering#893

Open
chaehyun2 wants to merge 2 commits intoslopus:mainfrom
chaehyun2:fix/markdown-table-bugs
Open

Fix markdown table parsing, selection, and empty cell rendering#893
chaehyun2 wants to merge 2 commits intoslopus:mainfrom
chaehyun2:fix/markdown-table-bugs

Conversation

@chaehyun2
Copy link

Summary

  • Fix column misalignment: Table parser used filter(cell.length > 0) which dropped empty interior cells, causing column shift when the first header cell is empty. Now strips only leading/trailing | and preserves all cells.
  • Fix text selection on web: Table Text elements were missing the selectable prop, preventing copy & paste on web. All other markdown blocks already had this.
  • Fix empty cell height collapse: Empty cells had no text content so lineHeight didn't apply, making them ~1/3 the height of populated cells. Added minHeight: 40 to match expected cell height.

Test plan

  • Render a table with an empty first header cell (e.g. | | Col A | Col B |) — columns should align correctly
  • Select and copy table text on web
  • Verify empty cells have the same height as populated cells
  • Verify normal tables (no empty cells) still render correctly

🤖 Generated with Claude Code
via Happy

Chaehyun Lee and others added 2 commits March 20, 2026 23:34
- Preserve empty interior cells when parsing tables (fixes column
  misalignment when first header cell is empty)
- Add selectable prop to table text elements (enables text selection
  and copy on web, matching other markdown blocks)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Empty cells had no text content causing lineHeight to not apply,
resulting in cells ~1/3 the height of populated cells.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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