Skip to content
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

Selector being erroneously quoted first time but not subsequent #1966

Closed
mikehdt opened this issue Mar 29, 2016 · 1 comment
Closed

Selector being erroneously quoted first time but not subsequent #1966

mikehdt opened this issue Mar 29, 2016 · 1 comment

Comments

@mikehdt
Copy link

mikehdt commented Mar 29, 2016

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:

@function get-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 :)

@mikehdt mikehdt changed the title Selector being quoted first time but not subsequent Selector being erroneously quoted first time but not subsequent Mar 29, 2016
@xzyfer
Copy link
Contributor

xzyfer commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants