Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

theme_importer: Handle comma-separated token scopes (#27740)

Variant94f4bbf264f11
diff --git a/crates/theme_importer/src/vscode/syntax.rs b/crates/theme_importer/src/vscode/syntax.rs
index a611519eeb9..7b134089b70 100644
--- a/crates/theme_importer/src/vscode/syntax.rs
+++ b/crates/theme_importer/src/vscode/syntax.rs
@@ -150,7 +150,7 @@ impl ZedSyntaxToken {
VsCodeTokenScope::Many(scopes) => scopes.iter().collect(),
}
.iter()
- .map(|scope| scope.as_str())
+ .flat_map(|scope| scope.split(',').map(|s| s.trim()))
.collect::<Vec<_>>();
let scopes_to_match = self.to_vscode();