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

Closes #35712

Release Notes:

- Fixed white-space trimming leading to disconnect between list items
and content in markdown previews.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
Eduardo Alba
2025-09-08 12:37:11 +00:00
committed by GitHub
co-authored by Bennet Bo Fenner
parent 17499453f6
commit 40eec32cb8
@@ -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()