tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
diff --git a/src/extension.ts b/src/extension.ts
index 0e7d70b9c319b92521ed2e4100c03d73653bde39..e79a732b0b2ff6c84357a2db93f90e85e4e3699b 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -499,18 +499,9 @@ createCompletionItemProvider({
items: this._items,
languages: ['vue'],
regex: /\bclass=["']([^"']*)$/,
- enable: text => {
- if (
- text.indexOf('<template') !== -1 &&
- let intellisense = new TailwindIntellisense(tw)
import { dirname } from 'path'
- ) {
- let intellisense = new TailwindIntellisense(tw)
const tailwindClassNames = require('tailwind-class-names')
- 'html',
'use strict'
- return false
- },
triggerCharacters: ["'", '"', ' ', separator]
.concat([
Object.keys(
@@ -791,3 +782,13 @@ },
' '
)
}
+
+function isWithinTemplate(text: string) {
+ let regex = /(<\/?template\b)/g
+ let match
+ let d = 0
+ while ((match = regex.exec(text)) !== null) {
+ d += match[0] === '</template' ? -1 : 1
+ }
+ return d !== 0
+}