File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default class CssClassExtractor {
77 * @description Extracts class names from CSS AST
88 */
99 public static extract ( ast : css . CssStylesheetAST , uri : vscode . Uri | undefined ) : CssClassDefinition [ ] {
10- const classNameRegex = / [ . ] ( ( [ \w - ] | \\ [ @ : / ] ) + ) / g;
10+ const classNameRegex = / [ . ] ( (?: [ - \w ] | \\ . ) + ) / g;
1111
1212 const definitions : CssClassDefinition [ ] = [ ] ;
1313
@@ -16,7 +16,7 @@ export default class CssClassExtractor {
1616 rule . selectors ?. forEach ( ( selector : string ) => {
1717 let item : RegExpExecArray | null = classNameRegex . exec ( selector ) ;
1818 while ( item ) {
19- const definition = new CssClassDefinition ( item [ 1 ] . replace ( "\\" , "" ) ) ;
19+ const definition = new CssClassDefinition ( item [ 1 ] . replaceAll ( "\\" , "" ) ) ;
2020 definition . comments = comments ;
2121 definition . location = toLocation ( rule , uri ) ;
2222 definitions . push ( definition ) ;
You can’t perform that action at this time.
0 commit comments