Skip to content

Commit da05017

Browse files
committed
Match existing classes based on insertedText instead of label
Because the insertedText might now differ from the class name label, the inserted text should be used to determine if a class is already inserted.
1 parent bcc6ec3 commit da05017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function provideCompletionItemsGenerator(languageSelector: string, classMatchReg
9898
// Removes from the collection the classes already specified on the class attribute
9999
for (let i = 0; i < classesOnAttribute.length; i++) {
100100
for (let j = 0; j < completionItems.length; j++) {
101-
if (completionItems[j].label === classesOnAttribute[i]) {
101+
if (completionItems[j].insertText === classesOnAttribute[i]) {
102102
completionItems.splice(j, 1);
103103
}
104104
}

0 commit comments

Comments
 (0)