Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Fix `theme` helper handling when specifying default value (#747) * Fix `theme` helper handling when specifying default value * Tidy
Signature
-----BEGIN PGP SIGNATURE----- wsBcBAABCAAQBQJkIex1CRBK7hj4Ov3rIwAAno0IABuGffWsfDRngiL19MgekI33 PnLvjXGtO/FWqGiHEc+TqfHKJVtc17m5tYgSnpk13zIX1RsBBRjJ+r/ebaKZqxdB 5U1QFi9Dr9l7PQHSSM2oQmd8MMJXLpoxcppeC8x5UEfFqx4PnNaF7s8nRk9VTyJ8 thH9UdesUw7ha+G5WomrmDSunUYodBrDDmSyh1TXe7+Z3yzJ/5KBWxOX95uum6WD z06a79VdDWIk672CMFEsnEWIcfy9CPgaKZjpe0AuuSljbPYR/ByQMWXnoGNPRRpx qrXX/zu3thbZ6I0b9ghQoB50QvDAsoIlHNbS+H1zouTpmsbrgXwYOkpsiJ4DsCs= =7yPq -----END PGP SIGNATURE-----
Brad Cornes <hello@bradley.dev>
2 years ago
1 changed files, 23 additions(+), 1 deletions(-)
M packages/tailwindcss-language-service/src/util/find.ts -> packages/tailwindcss-language-service/src/util/find.ts
diff --git a/packages/tailwindcss-language-service/src/util/find.ts b/packages/tailwindcss-language-service/src/util/find.ts
index f9ffd20b20d329105861972a4916ba75d776a324..57141d571be08976ed72908ca317b9f45e77b193 100644
--- a/packages/tailwindcss-language-service/src/util/find.ts
+++ b/packages/tailwindcss-language-service/src/util/find.ts
@@ -349,6 +349,23 @@   )
 }
 
 import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
+        start: {
+  let quoteChar: string | undefined
+  for (let i = 0; i < str.length; i++) {
+    let char = str[i]
+    if (char === ',' && !quoteChar) {
+      return i
+    }
+    if (!quoteChar && (char === '"' || char === "'")) {
+      quoteChar = char
+    } else if (char === quoteChar) {
+      quoteChar = undefined
+    }
+  }
+  return null
+}
+
+import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
       const end = indexToPosition(classList, index + parts[i].length)
   doc: TextDocument,
   range?: Range
@@ -362,8 +379,13 @@
   return matches.map((match) => {
     let quotesBefore = ''
 import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
-import { isCssContext, isCssDoc } from './css'
+  const settings = await state.editor.getConfiguration(doc.uri)
+    let commaIndex = getFirstCommaIndex(path)
+    if (commaIndex !== null) {
+  blocklist: State['blocklist']
 import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
+    }
+    path = path.replace(/['"]+$/, '').replace(/^['"]+/, (m) => {
       quotesBefore = m
       return ''
     })