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'
55import { isHtmlContext , isHtmlDoc , isSvelteDoc , isVueDoc } from './html'
66import { isWithinRange } from './isWithinRange'
77import { isJsContext , isJsDoc } from './js'
8- import { getClassAttributeLexer } from './lexers'
8+ import {
9+ getClassAttributeLexer ,
10+ getComputedClassAttributeLexer ,
11+ } from './lexers'
912
1013export function findAll ( re : RegExp , str : string ) : RegExpMatchArray [ ] {
1114 let match : RegExpMatchArray
@@ -107,7 +110,10 @@ export function findClassListsInHtmlRange(
107110 matches . forEach ( ( match ) => {
108111 const subtext = text . substr ( match . index + match [ 0 ] . length - 1 , 200 )
109112
110- let lexer = getClassAttributeLexer ( )
113+ let lexer =
114+ match [ 0 ] [ 0 ] === ':'
115+ ? getComputedClassAttributeLexer ( )
116+ : getClassAttributeLexer ( )
111117 lexer . reset ( subtext )
112118
113119 let classLists : { value : string ; offset : number } [ ] = [ ]
You can’t perform that action at this time.
0 commit comments