Fix code block merging with previous spans in markdown widget
This commit is contained in:
parent
30ee9d024d
commit
cfbeb05e32
1 changed files with 10 additions and 1 deletions
|
|
@ -344,7 +344,16 @@ pub fn parse(markdown: &str) -> impl Iterator<Item = Item> + '_ {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
let prev = if spans.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
produce(
|
||||||
|
&mut lists,
|
||||||
|
Item::Paragraph(Text::new(spans.drain(..).collect())),
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
prev
|
||||||
}
|
}
|
||||||
pulldown_cmark::Tag::MetadataBlock(_) => {
|
pulldown_cmark::Tag::MetadataBlock(_) => {
|
||||||
metadata = true;
|
metadata = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue