Skip to content

Commit dad12aa

Browse files
committed
fix html class attr regex
1 parent 7c361e5 commit dad12aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ class TailwindIntellisense {
326326
'javascript',
327327
'javascriptreact'
328328
],
329-
/\bclass(Name)?=["']([^"']*)/, // /\bclass(Name)?=(["'])(?!.*?\2)/
329+
/\bclass(Name)?=["']([^"']*)$/, // /\bclass(Name)?=(["'])(?!.*?\2)/
330330
["'", '"', ' ', separator],
331331
tailwind.config
332332
)
@@ -391,7 +391,7 @@ class TailwindIntellisense {
391391
const text2: string = document.getText(range2)
392392

393393
let str = text1 + text2.substr(text1.length).match(/^([^"' ]*)/)[0]
394-
let matches = str.match(/\bclass(Name)?=["']([^"']*)/)
394+
let matches = str.match(/\bclass(Name)?=["']([^"']*)$/)
395395

396396
if (matches && matches[2]) {
397397
let className = matches[2].split(' ').pop()

0 commit comments

Comments
 (0)