Skip to content

Commit 0ca6e73

Browse files
committed
Merge branch 'main' of github.com:voorjaar/windicss-intellisense into main
2 parents 04834ef + abca40a commit 0ca6e73

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib/completions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { ExtensionContext, languages, Range, Position, CompletionItem, CompletionItemKind, Color, ColorInformation, Hover } from 'vscode';
22
import { highlightCSS, isColor, getConfig, rem2px } from '../utils';
33
import { fileTypes } from '../utils/filetypes';
4-
import { HTMLParser, ClassParser } from 'windicss/utils/parser';
4+
import { ClassParser } from 'windicss/utils/parser';
5+
import { HTMLParser } from '../utils/parser';
56
import type { Core } from '../interfaces';
67
import type { Disposable } from 'vscode';
78

src/utils/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class HTMLParser {
77
// Match all class properties
88
if (!this.html) return [];
99
//const classRegex = /[class|className|dark|light|active|after|before|checked|disabled|focus|hover|tw]\s*=\s*(["'])(?:(?=(\\?))\2.)*?\1/;
10-
const classRegex = /(class|className|dark|light|active|after|before|checked|disabled|focus|hover|tw)\s*=\s*["|']([.\w-+@!:/ ]*)["|']/;
10+
const classRegex = /(class|className|dark|light|active|after|before|checked|disabled|focus|hover|tw)\s*=\s*["']([.\w-+@!:/ ]*)["|']/;
1111
const quoteRegex = /["']/;
1212
const classNames = [];
1313
let _indexStart = 0;

0 commit comments

Comments
 (0)