Skip to content

Commit

Permalink
fix: camel case css class name missing
Browse files Browse the repository at this point in the history
close #1447
  • Loading branch information
johnsoncodehk committed Jun 17, 2022
1 parent 635898b commit 8bb99d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/vue-typescript/src/utils/parseCssClassNames.ts
@@ -1,10 +1,9 @@
import { clearComments } from './parseCssVars';

// https://gist.github.com/Potherca/f2a65491e63338659c3a0d2b07eee382
export function* parseCssClassNames(styleContent: string) {
styleContent = clearComments(styleContent);
const reg = /\.[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}/g;
const matchs = styleContent.matchAll(reg);
const cssClassNameRegex = /\.([\w-]+)/g;
const matchs = styleContent.matchAll(cssClassNameRegex);
for (const match of matchs) {
if (match.index !== undefined) {
const matchText = match[0];
Expand Down

0 comments on commit 8bb99d1

Please sign in to comment.