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

to-upper-case strings being double-quoted in 3.2.0-beta.6 #1127

Closed
sndrs opened this issue Apr 24, 2015 · 7 comments · Fixed by #1136
Closed

to-upper-case strings being double-quoted in 3.2.0-beta.6 #1127

sndrs opened this issue Apr 24, 2015 · 7 comments · Fixed by #1136

Comments

@sndrs
Copy link

sndrs commented Apr 24, 2015

using [email protected] on OS X, the following SCSS:

$s: to-upper-case('abcd');

p {
    content: '#{$s}';
    content: '#{unquote($s)}';
    content: '#{$s + unquote("efg")}';
    content: '#{$s + unquote("")}';
}

produces this CSS:

p {
  content: '"ABCD"';
  content: '"ABCD"';
  content: '"ABCD"efg';
  content: "ABCD"; 
}

I would have expected:

p {
  content: 'ABCD';
  content: 'ABCD';
  content: 'ABCDefg';
  content: 'ABCD'; 
}

I think this is a bug? Or have I just misunderstood?

@xzyfer
Copy link
Contributor

xzyfer commented Apr 24, 2015

I can confirm this is a regression in 3.2.0. Libsass 3.1.0 produced the expect output.

Correction Libsass 3.1.0 produced semantically correct output, but failed to normalise to double quotes.

@xzyfer
Copy link
Contributor

xzyfer commented Apr 24, 2015

Specs added sass/sass-spec#341

@xzyfer
Copy link
Contributor

xzyfer commented Apr 24, 2015

A git bisect shows this regression was introduced in 7877cfa

@mgreter
Copy link
Contributor

mgreter commented Apr 24, 2015

I get the expected result?

p {
  content: "ABCD";
  content: "ABCD";
  content: "ABCDefg";
  content: "ABCD"; }
# psass -v
psass 0.4.0 (perl sass/scss compiler)
  libsass: 3.2.0-beta.6-4-g8963
  sass2scss: 1.0.3

Btw. I'm testing this on windows 7.

@xzyfer
Copy link
Contributor

xzyfer commented Apr 25, 2015

I get the reported result on master on OSX

p {
  content: '"ABCD"';
  content: '"ABCD"';
  content: '"ABCD"efg';
  content: "ABCD"; }
➜  libsass git:(master) ✗ sassc -v
sassc: 3.2.0-beta.2
libsass: 3.2.0-beta.6-4-g8963
sass2scss: 1.0.3

@xzyfer
Copy link
Contributor

xzyfer commented Apr 25, 2015

I've got a working fix for this. Required a decent amount of refactoring. I'll PR something tomorrow after I've cleaned it up.

@sndrs
Copy link
Author

sndrs commented Apr 27, 2015

thank you! 😍

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

Successfully merging a pull request may close this issue.

3 participants