-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Disallow empty arbitrary values #15055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
6d099df
cdad88b
78b5ce9
b9987a5
2d91f1c
f55bb27
461352c
2e8db9a
598ec37
865fa76
0c85a04
7fe73a4
065fea4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1416,3 +1416,130 @@ it('should parse candidates with a prefix', () => { | |||||
| ] | ||||||
| `) | ||||||
| }) | ||||||
|
|
||||||
| it.each([ | ||||||
| // Empty arbitrary value | ||||||
| 'bg-[]', | ||||||
| 'bg-()', | ||||||
| // Tricking the parser with a space is not allowed | ||||||
| 'bg-[_]', | ||||||
| 'bg-(_)', | ||||||
|
|
||||||
| // Empty arbitrary value, with typehint | ||||||
| 'bg-[color:]', | ||||||
| 'bg-(color:)', | ||||||
| // Tricking the parser with a space is not allowed | ||||||
RobinMalfait marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| 'bg-[color:_]', | ||||||
| 'bg-(color:_)', | ||||||
|
|
||||||
| // Empty arbitrary modifier | ||||||
| 'bg-red-500/[]', | ||||||
| 'bg-red-500/()', | ||||||
| // Tricking the parser with a space is not allowed | ||||||
| 'bg-red-500/[_]', | ||||||
| 'bg-red-500/(_)', | ||||||
|
|
||||||
| // Empty arbitrary modifier for arbitrary properties | ||||||
| '[color:red]/[]', | ||||||
| '[color:red]/()', | ||||||
| // Tricking the parser with a space is not allowed | ||||||
| '[color:red]/[_]', | ||||||
| '[color:red]/(_)', | ||||||
|
|
||||||
| // Empty arbitrary value and modifier | ||||||
| 'bg-[]/[]', | ||||||
| 'bg-()/[]', | ||||||
| 'bg-[]/()', | ||||||
| 'bg-()/()', | ||||||
| // Tricking the parser with a space is not allowed | ||||||
| 'bg-[_]/[]', | ||||||
| 'bg-(_)/[]', | ||||||
| 'bg-[_]/()', | ||||||
| 'bg-(_)/()', | ||||||
| 'bg-[]/[_]', | ||||||
| 'bg-()/[_]', | ||||||
| 'bg-[]/(_)', | ||||||
| 'bg-()/(_)', | ||||||
| 'bg-[_]/[_]', | ||||||
| 'bg-(_)/[_]', | ||||||
| 'bg-[_]/(_)', | ||||||
| 'bg-(_)/(_)', | ||||||
|
|
||||||
| // Functional components | ||||||
|
||||||
| // Functional components | |
| // Functional utilities |
Not sure I understand this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React brain... this should say Functional variants and the other one Compound variants because I wanted to verify that we handled functional variants and compound variants correctly (since they are different types and handled separately).
Uh oh!
There was an error while loading. Please reload this page.