File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ import { isCssContext, isCssDoc } from './css'
5
5
import { isHtmlContext , isHtmlDoc , isSvelteDoc , isVueDoc } from './html'
6
6
import { isWithinRange } from './isWithinRange'
7
7
import { isJsContext , isJsDoc } from './js'
8
- import { getClassAttributeLexer } from './lexers'
8
+ import {
9
+ getClassAttributeLexer ,
10
+ getComputedClassAttributeLexer ,
11
+ } from './lexers'
9
12
10
13
export function findAll ( re : RegExp , str : string ) : RegExpMatchArray [ ] {
11
14
let match : RegExpMatchArray
@@ -107,7 +110,10 @@ export function findClassListsInHtmlRange(
107
110
matches . forEach ( ( match ) => {
108
111
const subtext = text . substr ( match . index + match [ 0 ] . length - 1 , 200 )
109
112
110
- let lexer = getClassAttributeLexer ( )
113
+ let lexer =
114
+ match [ 0 ] [ 0 ] === ':'
115
+ ? getComputedClassAttributeLexer ( )
116
+ : getClassAttributeLexer ( )
111
117
lexer . reset ( subtext )
112
118
113
119
let classLists : { value : string ; offset : number } [ ] = [ ]
You can’t perform that action at this time.
0 commit comments