Repository navigation
made whitespace character optional - #8057
Conversation
|
@HighwayChile This works great. Can you add 2 unit tests: 1 for |
|
@redmunds Yes! Perfect opportunity -- I'm just starting to look at how brackets tests are organized. |
|
Excellent -- let me know if you have any questions. |
There was a problem hiding this comment.
@HighwayChile After thinking about this a bit more, instead of making preceding whitespace optional, I think we should add option for a colon. This will eliminate false positives for something like xyz-linear-gradient(...). Will that work?
There was a problem hiding this comment.
@redmunds hmm, let me look at the regex more closely.
|
@redmunds after looking at the regex more, your suggestion is more readable and better matching. Will try to get some tests in tomorrow. Woohoo! |
|
@redmunds ok tests are in |
There was a problem hiding this comment.
The most common CSS whitespace style between property and value is prop: val, and the second most popular is no whitespace at all: prop:val so add that case (both here and for radial-gradient).
|
@HighwayChile Just 2 more minor comments. |
|
@redmunds I used a percentage for the radial values because I got an odd result when using the px values. It looks like when the test.css is read for testing, the px value is interpreted as a percentage value -- then it fails because the test is expecting the px value. I can look into this more if it's helpful. Otherwise, I'll stick with the percentage values. |
|
Look good. Thanks. Merging. |
made whitespace character optional
|
@redmunds Awesome, Thanks! |
Addresses #8028 - Quick View doesn't recognize linear-gradient if no space before it
Updated regex to make whitespace character optional before "linear" or "radial"