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
I am unsure if this is related to #1947 etc., however I have observed some strange string behaviour in libsass. I have reduced it down to as small a test case as I could. This behaviour is in Libsass 3.3.2, using the node-sass wrapper 3.4.2
Given the following code:
@functionget-name () {
@return".weird";
}
#{get-name()},
#{get-name()} {
content: 'what is going on here?';
}
Libsass will produce the following output:
".weird",
.weird {
content: 'what is going on here?';
}
As you can see, the first instance of get-name() becomes erroneously quoted, whilst the second does not. This causes the selector to be evaluated as invalid, and also causes strange behaviour in any subsequent build processes (e.g. minification).
This example comes from more complex code where the second call has different parameters passed, but produces the same erroneous result. Whilst this code may seem contrived, in the use-case where I encountered this issue, it isn't.
Any insight welcome. As mentioned, I'm unsure if it's a related symptom of some of the other interpolation issues, so please feel free to check if this is duplicate or additional misbehaviour :)
The text was updated successfully, but these errors were encountered:
mikehdt
changed the title
Selector being quoted first time but not subsequent
Selector being erroneously quoted first time but not subsequent
Mar 29, 2016
Thanks for the report @mikehdt. We've had some issue with #{} incorrectly returning quoted strings. The good news is this is fixed 3.3.3+. You can get it by installing node-sass@beta. We're still ironing out some kinks with 3.3.3 and 3.3.3 before updating the stable node-sass.
I am unsure if this is related to #1947 etc., however I have observed some strange string behaviour in libsass. I have reduced it down to as small a test case as I could. This behaviour is in Libsass 3.3.2, using the node-sass wrapper 3.4.2
Given the following code:
Libsass will produce the following output:
As you can see, the first instance of get-name() becomes erroneously quoted, whilst the second does not. This causes the selector to be evaluated as invalid, and also causes strange behaviour in any subsequent build processes (e.g. minification).
This example comes from more complex code where the second call has different parameters passed, but produces the same erroneous result. Whilst this code may seem contrived, in the use-case where I encountered this issue, it isn't.
Any insight welcome. As mentioned, I'm unsure if it's a related symptom of some of the other interpolation issues, so please feel free to check if this is duplicate or additional misbehaviour :)
The text was updated successfully, but these errors were encountered: