Skip to content

Commit 25445cc

Browse files
committed
lit support
1 parent f764441 commit 25445cc

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All notable changes to the extension will be documented in this file.
44

55
## [1.14.0] - 2023-12-
66

7+
- Initial support for lit css
78
- Match on patterns with a colon in addition to equals.
89
- Ported to rollup.
910
- Updated dependencies.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"angular",
3737
"react",
3838
"vue",
39+
"lit",
3940
"multi-root ready"
4041
],
4142
"activationEvents": [

src/completion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ export class SelectorCompletionItemProvider
154154
findEmbedded(uri: Uri, keys: Set<string>, text: string) {
155155
const key = uri.toString();
156156
const items: CompletionItem[] = [];
157-
const findStyles = /<style[^>]*>([^<]+)<\/style>/gi;
157+
const findStyles = /(?:<style[^>]*>([^<]+)<\/style>|css\s*`([^`]+)`)/gi;
158158

159159
let style;
160160

161161
while ((style = findStyles.exec(text)) !== null) {
162-
this.parseTextToItems(basename(uri.fsPath), style[1], items);
162+
this.parseTextToItems(basename(uri.fsPath), style[1] || style[2], items);
163163
}
164164

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

0 commit comments

Comments
 (0)