File tree 1 file changed +2
-9
lines changed
packages/tailwindcss-language-service/src/util
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -350,10 +350,7 @@ export function findHelperFunctionsInRange(
350
350
range ?: Range
351
351
) : DocumentHelperFunction [ ] {
352
352
const text = getTextWithoutComments ( doc , 'css' , range )
353
- let matches = findAll (
354
- / (?< prefix > \s | ^ ) (?< helper > c o n f i g | t h e m e ) (?< innerPrefix > \( \s * ) (?< path > [ ^ ) ] * ?) \s * \) / g,
355
- text
356
- )
353
+ let matches = findAll ( / \b (?< helper > c o n f i g | t h e m e ) (?< innerPrefix > \( \s * ) (?< path > [ ^ ) ] * ?) \s * \) / g, text )
357
354
358
355
return matches . map ( ( match ) => {
359
356
let quotesBefore = ''
@@ -367,11 +364,7 @@ export function findHelperFunctionsInRange(
367
364
}
368
365
path = path . replace ( / [ ' " ] * \s * $ / , '' )
369
366
370
- let startIndex =
371
- match . index +
372
- match . groups . prefix . length +
373
- match . groups . helper . length +
374
- match . groups . innerPrefix . length
367
+ let startIndex = match . index + match . groups . helper . length + match . groups . innerPrefix . length
375
368
376
369
return {
377
370
helper : match . groups . helper === 'theme' ? 'theme' : 'config' ,
You can’t perform that action at this time.
0 commit comments