From dad12aa7c90b3ae37e6cb2bc9daf946c71392083 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Mon, 28 May 2018 18:00:45 +0100 Subject: [PATCH] fix html class attr regex --- src/extension.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index c4b9f97..06afef6 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -326,7 +326,7 @@ class TailwindIntellisense { 'javascript', 'javascriptreact' ], - /\bclass(Name)?=["']([^"']*)/, // /\bclass(Name)?=(["'])(?!.*?\2)/ + /\bclass(Name)?=["']([^"']*)$/, // /\bclass(Name)?=(["'])(?!.*?\2)/ ["'", '"', ' ', separator], tailwind.config ) @@ -391,7 +391,7 @@ class TailwindIntellisense { const text2: string = document.getText(range2) let str = text1 + text2.substr(text1.length).match(/^([^"' ]*)/)[0] - let matches = str.match(/\bclass(Name)?=["']([^"']*)/) + let matches = str.match(/\bclass(Name)?=["']([^"']*)$/) if (matches && matches[2]) { let className = matches[2].split(' ').pop()