From 20b140664d3b003ef4b23c03384f40c7c57aea06 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Tue, 31 Mar 2026 17:10:29 -0700 Subject: [PATCH] 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 --- crates/markdown/src/markdown.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs index 7b95688df54610f92b6960d9afc3037bf484b8ed..024e377c2538214c9579c8f025250e2166cf7ace 100644 --- a/crates/markdown/src/markdown.rs +++ b/crates/markdown/src/markdown.rs @@ -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(); }