Skip to content

Commit a9a7b81

Browse files
committed
Update readme
1 parent 4ed1b3d commit a9a7b81

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function MyButton({ children }) {
9393

9494
### Using regex patterns
9595

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:
9797

9898
```json5
9999
// .prettierrc
@@ -118,13 +118,6 @@ function MyButton({ children }) {
118118
}
119119
```
120120

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-
128121
## Sorting classes in function calls
129122

130123
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

Comments
 (0)