-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add a failing test case for &
within a nested function in a declaration value
#307
Conversation
stylis(` | ||
background-image: image-set(url(${urlOneX}) 1x, url(${urlTwoX}) 2x); | ||
`) | ||
).to.equal(`.user{background-image:image-set(url(${urlOneX}) 1x, url(${urlTwoX}) 2x);}`) |
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.
\f
gets incorrectly appended to &
here:
Lines 47 to 49 in bc0b1b0
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1) | |
ampersand = -1 | |
break |
I'd like to conditionally use this replace
here - we need to skip it when we are in the context of the property. I've tried to use property
for this and while I managed to fix this case I broke some other cases like this one:
Lines 593 to 601 in bc0b1b0
test('pseudo-selector with & in a string', () => { | |
expect( | |
stylis(` | |
h1:matches(&,[href="https://css-tricks.com?a=1&b=2"]) { | |
display: none | |
} | |
`) | |
).to.equal(`h1:matches(.user,[href="https://css-tricks.com?a=1&b=2"]){display:none;}`) | |
}) |
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.
@thysultan friendly 🏓
Pull Request Test Coverage Report for Build 673315f00359b3ae65949786d475d88332f8149d-PR-307
💛 - Coveralls |
@Andarist didn't notice this when you opened it, (only the friendly ping): fixed in the head commit, you can merge/release this one. |
Pull Request Test Coverage Report for Build 673315f00359b3ae65949786d475d88332f8149d-PR-307Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Related to emotion-js/emotion#2943