diff --git a/config/src/color.rs b/config/src/color.rs index 7259d6290..422aa37de 100644 --- a/config/src/color.rs +++ b/config/src/color.rs @@ -495,18 +495,7 @@ impl ColorSchemeFile { pub fn from_toml_str(s: &str) -> anyhow::Result { let scheme: toml::Value = toml::from_str(s)?; - let mut scheme = ColorSchemeFile::from_toml_value(&scheme)?; - - // Little hack to extract comment style metadata from - // iTerm2-Color-Schemes generated toml files - if scheme.metadata.name.is_none() { - if let Some(first_line) = s.lines().next() { - if let Some(name) = first_line.strip_prefix("# ") { - scheme.metadata.name.replace(name.to_string()); - } - } - } - Ok(scheme) + Self::from_toml_value(&scheme) } pub fn to_toml_value(&self) -> anyhow::Result {