We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6bdfa0 commit 0c046c8Copy full SHA for 0c046c8
src/parse-engines/common/css-class-extractor.ts
@@ -6,7 +6,7 @@ export default class CssClassExtractor {
6
* @description Extracts class names from CSS AST
7
*/
8
public static extract(ast: css.Stylesheet): CssClassDefinition[] {
9
- const classNameRegex = /[.]([\w-]+)/g;
+ const classNameRegex = /[.]([\w-\\@\\:\\/]+)/g;
10
11
const definitions: CssClassDefinition[] = [];
12
@@ -15,7 +15,7 @@ export default class CssClassExtractor {
15
rule.selectors?.forEach((selector: string) => {
16
let item: RegExpExecArray | null = classNameRegex.exec(selector);
17
while (item) {
18
- definitions.push(new CssClassDefinition(item[1]));
+ definitions.push(new CssClassDefinition(item[1].replace("\\", "")));
19
item = classNameRegex.exec(selector);
20
}
21
});
0 commit comments