markdown_preview: Fix preview not rendering bullet points beginning with HTML (#27018)

Closes #26631

Release Notes:

- Fixed markdown preview not rendering bullet points beginning with HTML

Before:
<img width="822" alt="before"
src="https://github.com/user-attachments/assets/102a7eac-fcc2-457b-9587-4a021800841d"
/>


After:
<img width="822" alt="after"
src="https://github.com/user-attachments/assets/8544b318-0efa-46c3-bd9b-c6c21444fab7"
/>

Note: I thought it would make sense to return `true` in `is_text_like`
for `Event::InlineMath` and `Event::DisplayMath` as well, but it looks
like rendering inline math is not supported at all at the moment:


https://github.com/zed-industries/zed/blob/4402e033a47db8ab6bf05623a9f111dc7b44cbd5/crates/markdown/src/parser.rs#L108
This commit is contained in:
Nils Koch
2025-03-24 13:57:06 +01:00
committed by GitHub
parent d253d46fdf
commit 4e33aaa55c
@@ -100,6 +100,7 @@ impl<'a> MarkdownParser<'a> {
// Represent an inline code block
| Event::Code(_)
| Event::Html(_)
| Event::InlineHtml(_)
| Event::FootnoteReference(_)
| Event::Start(Tag::Link { .. })
| Event::Start(Tag::Emphasis)