fix: allow rich text to wrap properly
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user