mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
parent
fc0a8c14dc
commit
f4431d2acc
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,9 @@ export class ColorTheme {
|
||||||
static fromRules(rules: TextMateRule[]): ColorTheme {
|
static fromRules(rules: TextMateRule[]): ColorTheme {
|
||||||
const res = new ColorTheme();
|
const res = new ColorTheme();
|
||||||
for (const rule of rules) {
|
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]
|
||||||
: rule.scope;
|
: rule.scope;
|
||||||
for (const scope of scopes) {
|
for (const scope of scopes) {
|
||||||
|
|
Loading…
Reference in a new issue