@@ -22,7 +22,6 @@ pub struct Markdown {
23 config_loader: Arc<syntax::Loader>,
23 config_loader: Arc<syntax::Loader>,
26 block_style: String,
25 block_style: String,
27 heading_style: String,
26 heading_style: String,
@@ -35,14 +34,12 @@ impl Markdown {
37 config_loader,
36 config_loader,
38− text_style: "markup.normal".into(),
39 block_style: "markup.raw.inline".into(),
37 block_style: "markup.raw.inline".into(),
40 heading_style: "markup.heading".into(),
38 heading_style: "markup.heading".into(),
44 pub fn style_group(mut self, suffix: &str) -> Self {
42 pub fn style_group(mut self, suffix: &str) -> Self {
45− self.text_style = format!("markup.normal.{}", suffix);
46 self.block_style = format!("markup.raw.inline.{}", suffix);
43 self.block_style = format!("markup.raw.inline.{}", suffix);
47 self.heading_style = format!("markup.heading.{}", suffix);
44 self.heading_style = format!("markup.heading.{}", suffix);
@@ -78,7 +75,7 @@ impl Markdown {
78 .unwrap_or_default()
75 .unwrap_or_default()
81− let text_style = get_theme!(self.text_style);
78+ let text_style = theme.map(|theme| theme.get("ui.text")).unwrap_or_default();
82 let code_style = get_theme!(self.block_style);
79 let code_style = get_theme!(self.block_style);
83 let heading_style = get_theme!(self.heading_style);
80 let heading_style = get_theme!(self.heading_style);