parent
fc0a8c14dc
commit
f4431d2acc
@ -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 New Issue
Block a user