aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbjorn3 <[email protected]>2020-02-01 12:12:39 +0000
committerbjorn3 <[email protected]>2020-02-01 12:12:39 +0000
commitf4431d2acc8e5dd25ed41c0c8af97050a7a230d1 (patch)
treed99157075600942124a4417eefcbdf4168fe0880 /editors
parentfc0a8c14dcc6404c5d2ebb76488d6ebd894926c8 (diff)
[VSCode] Fix syntax highlighting
Fixes #2969
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/color_theme.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/code/src/color_theme.ts b/editors/code/src/color_theme.ts
index cbad47f35..e4d20490b 100644
--- a/editors/code/src/color_theme.ts
+++ b/editors/code/src/color_theme.ts
@@ -28,7 +28,9 @@ export class ColorTheme {
28 static fromRules(rules: TextMateRule[]): ColorTheme { 28 static fromRules(rules: TextMateRule[]): ColorTheme {
29 const res = new ColorTheme(); 29 const res = new ColorTheme();
30 for (const rule of rules) { 30 for (const rule of rules) {
31 const scopes = typeof rule.scope === 'string' 31 const scopes = typeof rule.scope === 'undefined'
32 ? []
33 : typeof rule.scope === 'string'
32 ? [rule.scope] 34 ? [rule.scope]
33 : rule.scope; 35 : rule.scope;
34 for (const scope of scopes) { 36 for (const scope of scopes) {