@@ -271,6 +271,8 @@ function groupUtilityToSass(
271271 } else if ( node . children . length ) {
272272 groupUtilityToSass ( node . children , ++ deepth , true )
273273 }
274+ } else {
275+ groupUtilityToSass ( node . children , ++ deepth , true )
274276 }
275277 }
276278 } )
@@ -309,14 +311,6 @@ function groupUtilityToSass(
309311 } )
310312
311313 groupSass += `}\n\n`
312-
313- // const classList = _utilityList
314- // .map((x: IGroupModifierPair) => x.utility)
315- // .join(' ')
316-
317- // groupSass += `&:${modifier} {\n`
318- // groupSass += `\t@apply ${classList};\n`
319- // groupSass += ` }\n`
320314 } )
321315 }
322316
@@ -353,9 +347,6 @@ function getSassTree(nodeTree: IHtmlNode[], deepth = 0) {
353347 ? `@apply ${ node . filterAttributes . class } ;`
354348 : ''
355349
356- // remove group class
357- tailwindClassList = tailwindClassList . replace ( / ( g r o u p ) (? ! - ) / gm, ' ' )
358-
359350 treeString += tailwindClassList
360351 }
361352
@@ -383,12 +374,15 @@ function getSassTree(nodeTree: IHtmlNode[], deepth = 0) {
383374
384375 let groupUtilityTree = ''
385376
386- if ( node . filterAttributes ?. class ?. match ( / ( g r o u p ) (? ! - ) / gm) ) {
377+ if ( node . filterAttributes ?. class ?. match ( / ( g r o u p ) (? ! - ) / gm) ) {
387378 groupUtilityTree = groupUtilityToSass ( node . children , deepth )
388379
389380 if ( groupUtilityTree !== '' ) {
390381 treeString += groupUtilityTree
391382
383+ // clear parent group class name
384+ treeString = treeString . replace ( / ( g r o u p ) (? ! - ) / gm, ' ' )
385+
392386 // clear group modifier classes from @apply
393387 subTreeString = subTreeString . replace (
394388 / g r o u p - ( [ a - z 0 - 9 ] + ) : ( [ a - z 0 - 9 -:\/ ] + ) / gm,
0 commit comments