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

Improve binary expressions to preserve whitespace at operands #1739

Merged
merged 6 commits into from
Nov 25, 2015

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented Nov 15, 2015

@xzyfer couldn't resist to fix this 🙈 I hope you can incorporate this easily with your parsing refactor. This here doesn't touch the static value parsing and should be pretty well self contained.

This should currently pass this specs (sass/sass-spec#624):

div {
  baz: #{1/2}/3;
  baz: #{1/  2}/  3;
  baz: #{1  /2}  /3;
  baz: #{1  /  2}  /  3;
}

add {
  baz: #{1+2}+3;
  baz: #{1+  2}+  3;
  baz: #{1  +2}  +3;
  baz: #{1  +  2}  +  3;
}

sub {
  baz: #{1-2}-3;
  baz: #{1-  2}-  3;
  baz: #{1  -2}  -3;
  baz: #{1  -  2}  -  3;
}

mul {
  baz: #{1*2}*3;
  baz: #{1*  2}*  3;
  baz: #{1  *2}  *3;
  baz: #{1  *  2}  *  3;
}

mod {
  baz: #{1%2}%3;
  baz: #{1%  2}%  3;
  baz: #{1  %2}  %3;
  baz: #{1  %  2}  %  3;
}

Fixes #1722

@mgreter mgreter self-assigned this Nov 15, 2015
@mgreter mgreter added this to the 3.3.3 milestone Nov 15, 2015
@mgreter mgreter force-pushed the refactor/operand-struct branch 2 times, most recently from e0ad539 to 9e897af Compare November 16, 2015 00:35
mgreter added a commit that referenced this pull request Nov 25, 2015
Improve binary expressions to preserve whitespace at operands
@mgreter mgreter merged commit aa922fc into sass:master Nov 25, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Dec 28, 2015

Spec activated sass/sass-spec#657

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

Successfully merging this pull request may close these issues.

Extra whitespace after "#{}" interpolation
2 participants