From c248a956e03b866f57544d45bde0efe2c1934c92 Mon Sep 17 00:00:00 2001 From: Arthur Schurhaus <95943247+artschur@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:58:51 -0300 Subject: [PATCH] markdown: Fix rendering of inline HTML tags (#43513) Added support for rendering HTML ` `tags inside Markdown content. Previously, these tags were ignored by the renderer and displayed as raw text (inside LSP hover documentation). Closes: #43166 Release Notes: - Fixed styling of `` HTML tags in Markdown popovers. Before: image After: image --- crates/markdown/src/markdown.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs index dd0d726734173591cb9ed9f8cc965d06aaee7e89..3f7d8e0d29eca1fff4af2b34c0bac9f32b4d730d 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("") { + builder.push_text_style(self.style.inline_code.clone()); + continue; + } + if html.trim_end().starts_with("") { + builder.pop_text_style(); + continue; + } builder.push_text(&parsed_markdown.source[range.clone()], range.clone()); } MarkdownEvent::Rule => {