File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
packages/tailwindcss-language-service/src/util Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -350,10 +350,7 @@ export function findHelperFunctionsInRange(
350350 range ?: Range
351351) : DocumentHelperFunction [ ] {
352352 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 )
357354
358355 return matches . map ( ( match ) => {
359356 let quotesBefore = ''
@@ -367,11 +364,7 @@ export function findHelperFunctionsInRange(
367364 }
368365 path = path . replace ( / [ ' " ] * \s * $ / , '' )
369366
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
375368
376369 return {
377370 helper : match . groups . helper === 'theme' ? 'theme' : 'config' ,
You can’t perform that action at this time.
0 commit comments