mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
Fix markdown table rendering in the agent panel (#52864)
This PR reverts part of https://github.com/zed-industries/zed/pull/50839, as it was causing bad clipping in the agent panel Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
a12601f863
commit
20b140664d
1 changed files with 2 additions and 8 deletions
|
|
@ -1609,23 +1609,18 @@ impl Element for MarkdownElement {
|
|||
builder.table.start(alignments.clone());
|
||||
|
||||
let column_count = alignments.len();
|
||||
builder.push_div(
|
||||
div().flex().flex_col().items_start(),
|
||||
range,
|
||||
markdown_end,
|
||||
);
|
||||
builder.push_div(
|
||||
div()
|
||||
.id(("table", range.start))
|
||||
.min_w_0()
|
||||
.grid()
|
||||
.grid_cols(column_count as u16)
|
||||
.when(self.style.table_columns_min_size, |this| {
|
||||
this.grid_cols_min_content(column_count as u16)
|
||||
})
|
||||
.when(!self.style.table_columns_min_size, |this| {
|
||||
this.grid_cols_max_content(column_count as u16)
|
||||
this.grid_cols(column_count as u16)
|
||||
})
|
||||
.w_full()
|
||||
.mb_2()
|
||||
.border(px(1.5))
|
||||
.border_color(cx.theme().colors().border)
|
||||
|
|
@ -1770,7 +1765,6 @@ impl Element for MarkdownElement {
|
|||
}
|
||||
}
|
||||
MarkdownTagEnd::Table => {
|
||||
builder.pop_div();
|
||||
builder.pop_div();
|
||||
builder.table.end();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue