diff --git a/crates/engine/src/cmd/insert.rs b/crates/engine/src/cmd/insert.rs index d0c1fdf09..48d0203b5 100644 --- a/crates/engine/src/cmd/insert.rs +++ b/crates/engine/src/cmd/insert.rs @@ -1502,9 +1502,9 @@ fn is_string_literal(v: &str) -> bool { /// written as `format_range` takes it (`"#RRGGBB"`, `{theme, tint}`, `"auto"`) and `fill` may be a /// colour alone (a solid fill) or `"none"` (no fill). An unknown key is an error rather than /// dropped: dropped, it left a rule with an empty format that matches and shows nothing. -fn cf_style_json(st: &Json) -> Result { +fn cf_style_json(st: &Json, cmd: &str) -> Result { const KEYS: [&str; 6] = ["font", "fill", "borders", "align", "num_fmt", "protection"]; - let err = |m: String| bad("home.conditionalFormat", m); + let err = |m: String| bad(cmd, m); let Some(obj) = st.as_object() else { return Err(err("`style` must be an object, e.g. {\"fill\": \"#FFC7CE\"}".into())) }; let mut st = obj.clone(); if let Some(k) = st.keys().find(|k| !KEYS.contains(&k.as_str())) { @@ -1604,7 +1604,7 @@ fn cf_style(rule: &Json, cmd: &str) -> Result