tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Signature
-----BEGIN PGP SIGNATURE-----
wsBcBAABCAAQBQJjaPWoCRBK7hj4Ov3rIwAAh/0IAGAHe5192FCTeqtmgyLNph5n
Zj6lTNrUFp1Z6c3t9B9tPlV994nbohx7DPQwmWuMXv11yfb+VJ3MDtRzFuxh7gY2
QFzYiZHs+kMaRZGLa772Q/kJco2ejIFEhGv25fkOWDLQnyfUsZbeVZT8InBK8fnq
lXIXBFAd8epi0XQmX53eeLcyDOP+B0ND1NTTb14X+xej/O/i7k7qRdHFPH4My+Qg
4w9iMpEegNvvDKB+6AAS9YhvQmIIrdndzWIRRNSucW1HoMSO1HXKf/LgfMDEnJVf
/WO/pFgoI759gtqhC8HPHZcPirOE+DNMHe7hCKr66MCabe2i6M7DQmz+Z8vRIy4=
=oDna
-----END PGP SIGNATURE-----
diff --git a/packages/tailwindcss-language-service/src/util/find.ts b/packages/tailwindcss-language-service/src/util/find.ts
index 8dd6ad93cad17673a1eebac6de4e6ccea88a19d2..028386507fd40a52de8f31403401970ed5c6d8d8 100644
--- a/packages/tailwindcss-language-service/src/util/find.ts
+++ b/packages/tailwindcss-language-service/src/util/find.ts
@@ -350,10 +350,7 @@ doc: TextDocument,
range?: Range
): DocumentHelperFunction[] {
const text = getTextWithoutComments(doc, 'css', range)
- let matches = findAll(
- /(?<prefix>\s|^)(?<helper>config|theme)(?<innerPrefix>\(\s*)(?<path>[^)]*?)\s*\)/g,
- text
- )
+ let matches = findAll(/\b(?<helper>config|theme)(?<innerPrefix>\(\s*)(?<path>[^)]*?)\s*\)/g, text)
return matches.map((match) => {
let quotesBefore = ''
@@ -367,11 +364,7 @@ path = matches[1]
}
path = path.replace(/['"]*\s*$/, '')
- let startIndex =
- match.index +
- match.groups.prefix.length +
- match.groups.helper.length +
- match.groups.innerPrefix.length
+ let startIndex = match.index + match.groups.helper.length + match.groups.innerPrefix.length
return {
helper: match.groups.helper === 'theme' ? 'theme' : 'config',