diff --git a/src/documents/document/tests/open_look.rs b/src/documents/document/tests/open_look.rs index 2a6dbe8..c7b4a0a 100644 --- a/src/documents/document/tests/open_look.rs +++ b/src/documents/document/tests/open_look.rs @@ -66,7 +66,7 @@ fn open_front_matter_keeps_its_panel(cx: &mut TestAppContext) { keeps_its_panel("---\nkey: value\n---\n\nText.\n", cx); } -/// Block 0 opens in place, its panel at the closed inset. +/// Block 0 opens with its panel at the closed inset. fn keeps_its_panel(source: &str, cx: &mut TestAppContext) { let (closed, open, cx) = closed_then_open(source, cx); assert!( @@ -137,6 +137,8 @@ fn an_open_sixth_heading_stays_muted(cx: &mut TestAppContext) { .color, fg ); + let code = run("###### Quiet `Code`\n", "Code", cx); + assert_eq!(code.color, fg, "code keeps its own color"); } /// The open text box's style for `kind`. diff --git a/src/documents/markdown.rs b/src/documents/markdown.rs index d28b6ee..b246e4d 100644 --- a/src/documents/markdown.rs +++ b/src/documents/markdown.rs @@ -180,7 +180,7 @@ pub fn markdown_highlights(text: &str, cx: &App) -> Vec<(Range, Highlight }, Mark::Code => Highlight { background: Some(colors.sunken), - ..plain + ..Highlight::new(colors.fg) }, Mark::Link => Highlight::new(colors.link), Mark::Quote => Highlight::new(colors.fg_muted),