mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #712] [CLOSED] fix(markdown): word-wrap table cells instead of truncating content #1507
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1507
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/712
Author: @mocksoul
Created: 2/19/2026
Status: ❌ Closed
Base:
main← Head:fix/table-word-wrap📝 Commits (1)
5a98f4ffeat(markdown): rewrite table layout to row-major for word-wrap support📊 Changes
2 files changed (+231 additions, -196 deletions)
View changed files
📝
packages/core/src/renderables/Markdown.ts(+138 -138)📝
packages/core/src/renderables/__tests__/Markdown.test.ts(+93 -58)📄 Description
Fixes #711
Summary
│───│→├───┼───┤(proper T-junctions)Problem
Table cells were created with
height: 1andoverflow: "hidden", silently cutting off any content that didn't fit in a single line. The column-major layout (each column as a separate flex-column) made it impossible to synchronize row heights across columns.Solution
Row-major layout: each row is a flex-row container. Yoga's default
alignItems: stretchautomatically synchronizes cell heights within a row.heightoroverflowonTextRenderable—measureFuncauto-calculates height from wrapped contentflexBasisset to natural column width (max content + padding + borders) for compact tablesflexShrink: 1enables proportional shrinking with word-wrap when the table exceeds viewport widthcustomBorderCharsper cell position for correct T-junction/cross charactersTesting
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.