Documents: inline code in a sixth-level heading keeps its own color
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
962964e7da
commit
2e65b05a65
2 files changed
+4
-2
No files matched your search
@@ -66,7 +66,7 @@ fn open_front_matter_keeps_its_panel(cx: &mut TestAppContext) {
|
|||||||
keeps_its_panel("---\nkey: value\n---\n\nText.\n", cx);
|
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) {
|
fn keeps_its_panel(source: &str, cx: &mut TestAppContext) {
|
||||||
let (closed, open, cx) = closed_then_open(source, cx);
|
let (closed, open, cx) = closed_then_open(source, cx);
|
||||||
assert!(
|
assert!(
|
||||||
@@ -137,6 +137,8 @@ fn an_open_sixth_heading_stays_muted(cx: &mut TestAppContext) {
|
|||||||
.color,
|
.color,
|
||||||
fg
|
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`.
|
/// The open text box's style for `kind`.
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ pub fn markdown_highlights(text: &str, cx: &App) -> Vec<(Range<usize>, Highlight
|
|||||||
},
|
},
|
||||||
Mark::Code => Highlight {
|
Mark::Code => Highlight {
|
||||||
background: Some(colors.sunken),
|
background: Some(colors.sunken),
|
||||||
..plain
|
..Highlight::new(colors.fg)
|
||||||
},
|
},
|
||||||
Mark::Link => Highlight::new(colors.link),
|
Mark::Link => Highlight::new(colors.link),
|
||||||
Mark::Quote => Highlight::new(colors.fg_muted),
|
Mark::Quote => Highlight::new(colors.fg_muted),
|
||||||
|
|||||||
Reference in new issue
Block a user