Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
update class attribute regex
Brad Cornes <bradlc41@gmail.com>
4 years ago
2 changed files, 2 additions(+), 2 deletions(-)
M packages/tailwindcss-language-service/src/completionProvider.ts -> packages/tailwindcss-language-service/src/completionProvider.ts
diff --git a/packages/tailwindcss-language-service/src/completionProvider.ts b/packages/tailwindcss-language-service/src/completionProvider.ts
index f11cab0f7363cdd87a14a4b9ba8721354b53c1b5..490a2eb91c63770422171bc84bf201811bf1e96b 100644
--- a/packages/tailwindcss-language-service/src/completionProvider.ts
+++ b/packages/tailwindcss-language-service/src/completionProvider.ts
@@ -159,7 +159,7 @@     start: { line: Math.max(position.line - 10, 0), character: 0 },
     end: position,
   })
 
-  const match = findLast(/(?:\b|:)class(?:Name)?=['"`{]/gi, str)
+  const match = findLast(/(?:\s|:)class(?:Name)?=['"`{]/gi, str)
 
   if (match === null) {
     return null
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 60fa9e8296f9696109fc974e4a0a6219ff7ee0cf..e80dfb2f6fdbf94b923edaaf561b0fd7b8da6bdb 100644
--- a/packages/tailwindcss-language-service/src/util/find.ts
+++ b/packages/tailwindcss-language-service/src/util/find.ts
@@ -135,7 +135,7 @@   doc: TextDocument,
   range?: Range
 ): DocumentClassList[] {
   const text = doc.getText(range)
-  const matches = findAll(/(?:\b|:)class(?:Name)?=['"`{]/g, text)
+  const matches = findAll(/(?:\s|:)class(?:Name)?=['"`{]/g, text)
   const result: DocumentClassList[] = []
 
   matches.forEach((match) => {