Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
tweak style block regexes
Brad Cornes <bradlc41@gmail.com>
3 years ago
2 changed files, 2 additions(+), 2 deletions(-)
M packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts -> packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
diff --git a/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts b/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
index 89773118f52d5cd5c0358158b84e58d4f487f290..aa33dceb0142c4d57ad4b42c9bdb5b5a453c4af3 100644
--- a/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
+++ b/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
@@ -42,7 +42,7 @@
   if (isHtmlDoc(state, doc) || isJsDoc(state, doc) || isSvelteDoc(doc)) {
     let text = doc.getText()
     let styleBlocks = findAll(
-      /(?<open><style(?:\s[^>]*[^\/]>|>|[^\/]>)).*?(?<close><\/style>|$)/gis,
+      /(?<open><style(?:\s[^>]*[^\/]>|\s*>)).*?(?<close><\/style>|$)/gis,
       text
     )
     let htmlRanges: Range[] = []
M packages/tailwindcss-language-service/src/util/html.ts -> packages/tailwindcss-language-service/src/util/html.ts
diff --git a/packages/tailwindcss-language-service/src/util/html.ts b/packages/tailwindcss-language-service/src/util/html.ts
index af0ab8088139adbda5ef6d93f601d4c66a32f779..a74a5374ec3dd742bacae1bab6152df25e1ad601 100644
--- a/packages/tailwindcss-language-service/src/util/html.ts
+++ b/packages/tailwindcss-language-service/src/util/html.ts
@@ -44,7 +44,7 @@   let open = 0
   let close = 0
   let match: RegExpExecArray
   let tags = Array.isArray(tag) ? tag : [tag]
-  let regex = new RegExp(`<(?<slash>/?)(?:${tags.join('|')})(?:\\s[^>]*[^\/]>|>|[^\/]>)`, 'ig')
+  let regex = new RegExp(`<(?<slash>/?)(?:${tags.join('|')})(?:\\s[^>]*[^\/]>|\\s*>)`, 'ig')
   while ((match = regex.exec(str)) !== null) {
     if (match.groups.slash) {
       close += 1