Skip to content

Commit a1c7658

Browse files
committed
feat: lit support
1 parent 94ad774 commit a1c7658

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"angular",
2020
"react",
2121
"vue",
22+
"lit",
2223
"multi-root ready"
2324
],
2425
"engines": {

src/completion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ export class SelectorCompletionItemProvider implements CompletionItemProvider, D
140140
findEmbedded(uri: Uri, keys: Set<string>, text: string) {
141141
const key = uri.toString();
142142
const items: CompletionItem[] = [];
143-
const findStyles = /<style[^>]*>([^<]+)<\/style>/gi;
143+
const findStyles = /(?:<style[^>]*>([^<]+)<\/style>|css\s*`([^`]+)`)/gi;
144144

145145
let style: string[] | null;
146146

147147
while ((style = findStyles.exec(text)) !== null) {
148-
this.parseTextToItems(basename(uri.fsPath), style[1], items);
148+
this.parseTextToItems(basename(uri.fsPath), style[1] || style[2], items);
149149
}
150150

151151
this.cache.set(key, items);

0 commit comments

Comments
 (0)