File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,11 @@ const styles: {
47
47
}
48
48
49
49
function splitVariantGroups ( content : string ) {
50
- return content . replace (
51
- / ( [ \w ! ] [ \w / : - ] * ?) : \( ( [ \s \w / - ] * ) \) / g,
52
- ( _ , groupOne : string , groupTwo : string ) =>
53
- groupTwo
54
- . split ( / \s / g)
55
- . map ( ( cssClass ) => `${ groupOne } :${ cssClass } ` )
56
- . join ( ' ' )
50
+ return content . replace ( / ( \w + ) : \( ( [ \s \w / < : ! - ] + ) \) / g, ( _ , groupOne : string , groupTwo : string ) =>
51
+ groupTwo
52
+ . split ( / \s / g)
53
+ . map ( ( cssClass ) => `${ groupOne } :${ cssClass } ` )
54
+ . join ( ' ' )
57
55
)
58
56
}
59
57
@@ -123,6 +121,7 @@ function extractStyles(): PreprocessorGroup {
123
121
return {
124
122
async markup ( { content, filename } ) : Promise < Processed > {
125
123
if ( ! filename ) return { code : content }
124
+ content = splitVariantGroups ( content )
126
125
if ( initialFileName . length === 0 ) initialFileName = filename
127
126
content = addStyleTag ( content )
128
127
content = content . replace ( / g l o b a l : / gi, '' )
You can’t perform that action at this time.
0 commit comments