Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

markdown_preview: Fix trimming of leading whitespace in Markdown lists (#35750)

Eduardo Alba40eec32cb8e0
diff --git a/crates/markdown_preview/src/markdown_renderer.rs b/crates/markdown_preview/src/markdown_renderer.rs
index 1e679b42cbf..4525db38351 100644
--- a/crates/markdown_preview/src/markdown_renderer.rs
+++ b/crates/markdown_preview/src/markdown_renderer.rs
@@ -277,7 +277,11 @@ fn render_markdown_list_item(
.items_start()
.children(vec![
bullet,
- div().children(contents).pr(cx.scaled_rems(1.0)).w_full(),
+ v_flex()
+ .children(contents)
+ .gap(cx.scaled_rems(1.0))
+ .pr(cx.scaled_rems(1.0))
+ .w_full(),
]);
cx.with_common_p(item).into_any()