mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [Convert] Preserve variable groupings.
This commit is contained in:
parent
c413672192
commit
cb5281021c
3 changed files with 22 additions and 1 deletions
|
@ -8,6 +8,8 @@
|
|||
* Don't check stylesheets for each request when running tests in Rails.
|
||||
This should speed up some tests significantly.
|
||||
|
||||
* Don't add extra newlines between variables with `sass-convert`.
|
||||
|
||||
## 3.0.0.rc.3
|
||||
|
||||
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.0.rc.3).
|
||||
|
|
|
@ -68,7 +68,8 @@ module Sass
|
|||
child.send("to_#{fmt}", 0, opts) +
|
||||
if nxt &&
|
||||
(child.is_a?(CommentNode) && child.line + child.value.count("\n") + 1 == nxt.line) ||
|
||||
(child.is_a?(ImportNode) && nxt.is_a?(ImportNode) && child.line + 1 == nxt.line)
|
||||
(child.is_a?(ImportNode) && nxt.is_a?(ImportNode) && child.line + 1 == nxt.line) ||
|
||||
(child.is_a?(VariableNode) && nxt.is_a?(VariableNode) && child.line + 1 == nxt.line)
|
||||
""
|
||||
else
|
||||
"\n"
|
||||
|
|
|
@ -888,6 +888,24 @@ SCSS
|
|||
assert_sass_to_scss '$var: 12px $bar baz !default;', '$var ||= 12px $bar "baz"'
|
||||
end
|
||||
|
||||
def test_multiple_variable_definitions
|
||||
assert_renders <<SASS, <<SCSS
|
||||
$var1: foo
|
||||
$var2: bar
|
||||
$var3: baz
|
||||
|
||||
$var4: bip
|
||||
$var5: bap
|
||||
SASS
|
||||
$var1: foo;
|
||||
$var2: bar;
|
||||
$var3: baz;
|
||||
|
||||
$var4: bip;
|
||||
$var5: bap;
|
||||
SCSS
|
||||
end
|
||||
|
||||
def test_division_asserted_with_parens
|
||||
assert_renders <<SASS, <<SCSS
|
||||
foo
|
||||
|
|
Loading…
Add table
Reference in a new issue