fix: allow rich text to wrap properly

This commit is contained in:
2026-06-06 23:44:39 +01:00
parent 686af21640
commit 742311e02c
2 changed files with 19 additions and 16 deletions

View File

@@ -114,7 +114,6 @@ enum ContentBlock {
},
Empty,
Table {
row_count: usize,
col_count: usize,
cells: Vec<RichTextContent>,
},
@@ -598,7 +597,6 @@ impl MarkdownText {
// the table consists of only the header row
self.blocks.push(ContentBlock::Table {
row_count,
col_count,
cells: cell_blocks,
});
@@ -690,21 +688,19 @@ impl gpui::Render for MarkdownText {
.child(content.clone()),
| ContentBlock::Table {
row_count,
col_count,
cells,
col_count, cells, ..
} => div().flex().w_full().child(
div()
.w_full()
.min_w_0()
.grid()
.grid_cols(*col_count as u16)
.grid_rows(*row_count as u16)
.h_40()
.border_l_1()
.border_t_1()
.border_color(theme.colors.border_muted)
.children(cells.iter().map(|cell_content| {
div()
.min_w_0()
.p_1()
.border_r_1()
.border_b_1()