on master help sign in
fix: There is no such thing as markup.normal, use ui.text
e7f5ec5Blaž Hrastnik
helix-term/src/ui/markdown.rs+1−4
@@ -22,7 +22,6 @@ pub struct Markdown {
22
22
23 config_loader: Arc<syntax::Loader>,
23 config_loader: Arc<syntax::Loader>,
24
24
25− text_style: String,
26 block_style: String,
25 block_style: String,
27 heading_style: String,
26 heading_style: String,
28}
27}
@@ -35,14 +34,12 @@ impl Markdown {
35 Self {
34 Self {
36 contents,
35 contents,
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(),
41 }
39 }
42 }
40 }
43
41
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);
48 self
45 self
@@ -78,7 +75,7 @@ impl Markdown {
78 .unwrap_or_default()
75 .unwrap_or_default()
79 };
76 };
80 }
77 }
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);
84
81