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:


4402e033a4/crates/markdown/src/parser.rs (L108)
This commit is contained in:
Nils Koch 2025-03-24 12:57:06 +00:00 committed by GitHub
parent d253d46fdf
commit 4e33aaa55c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)