@@ -238,7 +238,7 @@ export function parseClass(className: string): ParsedClass {
238238 }
239239
240240 // Regular negative value
241- const match = positiveUtility . match ( / ^ ( [ a - z - ] + ? ) (?: - ( .+ ) ) ? $ / )
241+ const match = positiveUtility . match ( / ^ ( [ a - z ] + (?: - [ a - z ] + ) * ) (?: - ( .+ ) ) ? $ / )
242242 if ( match ) {
243243 return {
244244 raw : className ,
@@ -253,7 +253,7 @@ export function parseClass(className: string): ParsedClass {
253253
254254 // Check for color opacity modifiers: bg-blue-500/50, text-red-500/75
255255 // Must come before fractional values to avoid conflict
256- const opacityMatch = utility . match ( / ^ ( [ a - z - ] + ? ) - ( .+ ?) \/ ( \d + ) $ / )
256+ const opacityMatch = utility . match ( / ^ ( [ a - z ] + (?: - [ a - z ] + ) * ) - ( .+ ?) \/ ( \d + ) $ / )
257257 if ( opacityMatch && [ 'bg' , 'text' , 'border' , 'ring' , 'placeholder' , 'divide' ] . includes ( opacityMatch [ 1 ] ) ) {
258258 return {
259259 raw : className ,
@@ -266,7 +266,7 @@ export function parseClass(className: string): ParsedClass {
266266 }
267267
268268 // Check for fractional values: w-1/2, h-3/4
269- const fractionMatch = utility . match ( / ^ ( [ a - z - ] + ? ) - ( \d + ) \/ ( \d + ) $ / )
269+ const fractionMatch = utility . match ( / ^ ( [ a - z - ] + ) - ( \d + ) \/ ( \d + ) $ / )
270270 if ( fractionMatch ) {
271271 return {
272272 raw : className ,
@@ -279,7 +279,7 @@ export function parseClass(className: string): ParsedClass {
279279 }
280280
281281 // Regular parsing - split on last dash
282- const match = utility . match ( / ^ ( [ a - z - ] + ? ) (?: - ( .+ ) ) ? $ / )
282+ const match = utility . match ( / ^ ( [ a - z ] + (?: - [ a - z ] + ) * ) (?: - ( .+ ) ) ? $ / )
283283 if ( ! match ) {
284284 return {
285285 raw : className ,
@@ -316,6 +316,7 @@ export function extractClasses(content: string): Set<string> {
316316
317317 for ( const pattern of patterns ) {
318318 let match
319+ // eslint-disable-next-line no-cond-assign
319320 while ( ( match = pattern . exec ( content ) ) !== null ) {
320321 const classStr = match [ 1 ]
321322 // Extract all quoted strings from the class string (handles template literals with expressions)
0 commit comments