Merge 0e0149feab
into a102b08743
This commit is contained in:
commit
872e324eaa
1 changed files with 19 additions and 3 deletions
|
@ -265,10 +265,22 @@ fn render_markdown_list_item(
|
|||
};
|
||||
let bullet = div().mr(cx.scaled_rems(0.5)).child(bullet);
|
||||
|
||||
let contents: Vec<AnyElement> = parsed
|
||||
let contents_with_spacing: Vec<AnyElement> = parsed
|
||||
.content
|
||||
.iter()
|
||||
.map(|c| render_markdown_block(c, cx))
|
||||
.enumerate()
|
||||
.map(|(i, c)| {
|
||||
let block = render_markdown_block(c, cx);
|
||||
if i > 0 {
|
||||
div()
|
||||
.mt(cx.scaled_rems(0.5))
|
||||
.mb(cx.scaled_rems(0.5))
|
||||
.child(block)
|
||||
.into_any_element()
|
||||
} else {
|
||||
block
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
let item = h_flex()
|
||||
|
@ -276,7 +288,11 @@ fn render_markdown_list_item(
|
|||
.items_start()
|
||||
.children(vec![
|
||||
bullet,
|
||||
div().children(contents).pr(cx.scaled_rems(1.0)).w_full(),
|
||||
div()
|
||||
.flex_col()
|
||||
.children(contents_with_spacing)
|
||||
.pr(cx.scaled_rems(1.0))
|
||||
.w_full(),
|
||||
]);
|
||||
|
||||
cx.with_common_p(item).into_any()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue