Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

markdown: Apply theme syntax color to inline code in rendered markdown (#54475)

Kento Yamamoto14f0a254ebee
diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs
index c2d8e45f16e..6751d2f7861 100644
--- a/crates/markdown/src/markdown.rs
+++ b/crates/markdown/src/markdown.rs
@@ -196,6 +196,11 @@ impl MarkdownStyle {
font_size: Some(buffer_font_size.into()),
font_weight: Some(buffer_font_weight),
background_color: Some(colors.editor_foreground.opacity(0.08)),
+ color: cx
+ .theme()
+ .syntax()
+ .style_for_name("text.literal")
+ .and_then(|style| style.color),
..Default::default()
},
link: TextStyleRefinement {