diff options
Diffstat (limited to 'subprojects/frontend/src/editor/semanticHighlighting.ts')
-rw-r--r-- | subprojects/frontend/src/editor/semanticHighlighting.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/subprojects/frontend/src/editor/semanticHighlighting.ts b/subprojects/frontend/src/editor/semanticHighlighting.ts index 2aed421b..a5d0af7a 100644 --- a/subprojects/frontend/src/editor/semanticHighlighting.ts +++ b/subprojects/frontend/src/editor/semanticHighlighting.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { RangeSet } from '@codemirror/rangeset'; | 1 | import { RangeSet, type TransactionSpec } from '@codemirror/state'; |
2 | import type { TransactionSpec } from '@codemirror/state'; | ||
3 | import { Decoration } from '@codemirror/view'; | 2 | import { Decoration } from '@codemirror/view'; |
4 | 3 | ||
5 | import { decorationSetExtension } from './decorationSetExtension'; | 4 | import { decorationSetExtension } from './decorationSetExtension'; |
@@ -16,7 +15,7 @@ const [setSemanticHighlightingInternal, semanticHighlighting] = decorationSetExt | |||
16 | 15 | ||
17 | export function setSemanticHighlighting(ranges: IHighlightRange[]): TransactionSpec { | 16 | export function setSemanticHighlighting(ranges: IHighlightRange[]): TransactionSpec { |
18 | const rangeSet = RangeSet.of(ranges.map(({ from, to, classes }) => Decoration.mark({ | 17 | const rangeSet = RangeSet.of(ranges.map(({ from, to, classes }) => Decoration.mark({ |
19 | class: classes.map((c) => `cmt-problem-${c}`).join(' '), | 18 | class: classes.map((c) => `tok-problem-${c}`).join(' '), |
20 | }).range(from, to)), true); | 19 | }).range(from, to)), true); |
21 | return setSemanticHighlightingInternal(rangeSet); | 20 | return setSemanticHighlightingInternal(rangeSet); |
22 | } | 21 | } |