Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
markdown: Fix rendering of inline HTML <code> tags (#43513)
Arthur Schurhausc248a956e03b
diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rsindex dd0d7267341..3f7d8e0d29e 100644--- a/crates/markdown/src/markdown.rs+++ b/crates/markdown/src/markdown.rs@@ -1202,6 +1202,15 @@ impl Element for MarkdownElement {builder.push_text(html, range.clone());}MarkdownEvent::InlineHtml => {+ let html = &parsed_markdown.source[range.clone()];+ if html.starts_with("<code>") {+ builder.push_text_style(self.style.inline_code.clone());+ continue;+ }+ if html.trim_end().starts_with("</code>") {+ builder.pop_text_style();+ continue;+ }builder.push_text(&parsed_markdown.source[range.clone()], range.clone());}MarkdownEvent::Rule => {