Skip to content

Commit f4ca38a

Browse files
authored
Optimize whitespace-only class detection (#429)
1 parent 28beb4e commit f4ca38a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sorting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function sortClasses(
4848

4949
// This class list is purely whitespace
5050
// Collapse it to a single space if the option is enabled
51-
if (/^[\t\r\f\n ]+$/.test(classStr) && collapseWhitespace) {
51+
if (collapseWhitespace && /^[\t\r\f\n ]+$/.test(classStr)) {
5252
return ' '
5353
}
5454

0 commit comments

Comments
 (0)