@@ -270,10 +270,11 @@ export async function findClassListsInRange(
270
270
range ?: Range ,
271
271
mode ?: 'html' | 'css' | 'jsx' ,
272
272
includeCustom : boolean = true ,
273
+ lang ?: string ,
273
274
) : Promise < DocumentClassList [ ] > {
274
275
let classLists : DocumentClassList [ ] = [ ]
275
276
if ( mode === 'css' ) {
276
- classLists = findClassListsInCssRange ( state , doc , range )
277
+ classLists = findClassListsInCssRange ( state , doc , range , lang )
277
278
} else if ( mode === 'html' || mode === 'jsx' ) {
278
279
classLists = await findClassListsInHtmlRange ( state , doc , mode , range )
279
280
}
@@ -448,11 +449,11 @@ export async function findClassNameAtPosition(
448
449
let groups = await Promise . all (
449
450
boundaries . map ( async ( { type, range, lang } ) => {
450
451
if ( type === 'css' ) {
451
- return findClassListsInCssRange ( state , doc , range , lang )
452
+ return await findClassListsInRange ( state , doc , range , 'css' , true , lang )
452
453
}
453
454
454
455
if ( type === 'html' ) {
455
- return await findClassListsInHtmlRange ( state , doc , 'html' , range )
456
+ return await findClassListsInRange ( state , doc , range , 'html' )
456
457
}
457
458
458
459
if ( type === 'js' || type === 'jsx' ) {
0 commit comments