You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ function MyButton({ children }) {
93
93
94
94
### Using regex patterns
95
95
96
-
You can also use regular expressions to match multiple attributes dynamically. Regex patterns should be enclosed in forward slashes:
96
+
You can also use regular expressions to match multiple attributes. Patterns should be enclosed in forward slashes. Note that JS regex literals are not supported with Prettier:
97
97
98
98
```json5
99
99
// .prettierrc
@@ -118,13 +118,6 @@ function MyButton({ children }) {
118
118
}
119
119
```
120
120
121
-
**Common regex patterns:**
122
-
123
-
-`"/data-.*/"` - Match all data attributes (data-class, data-theme, etc.)
124
-
-`"/.*List$/"` - Match attributes ending with "List" (classList, styleList, etc.)
125
-
-`"/my-prefix-.*/i"` - Case-insensitive match for attributes starting with "my-prefix-"
126
-
-`"/(styleNames|classNames)/"` - Match multiple specific attribute names
127
-
128
121
## Sorting classes in function calls
129
122
130
123
In addition to sorting classes in attributes, you can also sort classes in strings provided to function calls. This is useful when working with libraries like [clsx](https://github.com/lukeed/clsx) or [cva](https://cva.style/).
0 commit comments