diff options
Diffstat (limited to 'editors/code/src/highlighting.ts')
-rw-r--r-- | editors/code/src/highlighting.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts index 4b961170b..bc19fae2f 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts | |||
@@ -2,7 +2,7 @@ import seedrandom = require('seedrandom'); | |||
2 | import * as vscode from 'vscode'; | 2 | import * as vscode from 'vscode'; |
3 | import * as lc from 'vscode-languageclient'; | 3 | import * as lc from 'vscode-languageclient'; |
4 | import * as scopes from './scopes' | 4 | import * as scopes from './scopes' |
5 | 5 | import * as scopesMapper from './scopes_mapper'; | |
6 | 6 | ||
7 | import { Server } from './server'; | 7 | import { Server } from './server'; |
8 | 8 | ||
@@ -65,10 +65,13 @@ export class Highlighter { | |||
65 | tag: string, | 65 | tag: string, |
66 | textDecoration?: string | 66 | textDecoration?: string |
67 | ): [string, vscode.TextEditorDecorationType] => { | 67 | ): [string, vscode.TextEditorDecorationType] => { |
68 | const scope = scopes.find(tag) | ||
69 | 68 | ||
70 | if (scope) { | 69 | const foundRule = scopesMapper.toRule(tag, scopes.find) || scopes.find(tag) |
71 | const decor = createDecorationFromTextmate(scope); | 70 | |
71 | |||
72 | |||
73 | if (foundRule) { | ||
74 | const decor = createDecorationFromTextmate(foundRule); | ||
72 | return [tag, decor]; | 75 | return [tag, decor]; |
73 | } | 76 | } |
74 | else { | 77 | else { |