theme: Include key names in style parsing warnings

This should make it easier to figure out why the theme-check CI job
fails. Previously the message didn't include the failing key so you
were left searching or guessing where the error occurred.
This commit is contained in:
Michael Davis 2024-12-04 10:24:42 -05:00
parent 7a2afdc080
commit 07e7e7534d
No known key found for this signature in database

View File

@ -280,7 +280,7 @@ fn build_theme_values(
for (name, style_value) in values {
let mut style = Style::default();
if let Err(err) = palette.parse_style(&mut style, style_value) {
warnings.push(err);
warnings.push(format!("Failed to parse style for key {name:?}. {err}"));
}
// these are used both as UI and as highlights