mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
parent
fc0a8c14dc
commit
f4431d2acc
@ -28,7 +28,9 @@ export class ColorTheme {
|
||||
static fromRules(rules: TextMateRule[]): ColorTheme {
|
||||
const res = new ColorTheme();
|
||||
for (const rule of rules) {
|
||||
const scopes = typeof rule.scope === 'string'
|
||||
const scopes = typeof rule.scope === 'undefined'
|
||||
? []
|
||||
: typeof rule.scope === 'string'
|
||||
? [rule.scope]
|
||||
: rule.scope;
|
||||
for (const scope of scopes) {
|
||||
|
Loading…
Reference in New Issue
Block a user