haml-edge 2.3.201 → 2.3.202
Sign up to get free protection for your applications and to get access to all the features.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/exec.rb +1 -1
- data/lib/sass/engine.rb +1 -0
- data/lib/sass/tree/comment_node.rb +3 -2
- data/test/sass/conversion_test.rb +15 -15
- data/test/sass/css2sass_test.rb +3 -3
- data/test/sass/engine_test.rb +12 -0
- metadata +2 -2
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.202
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.202
|
data/lib/haml/exec.rb
CHANGED
@@ -594,7 +594,7 @@ END
|
|
594
594
|
'By default, this is inferred from the input filename.',
|
595
595
|
'If there is none, defaults to css.') do |name|
|
596
596
|
@options[:from] = name.downcase.to_sym
|
597
|
-
unless [:css, :scss, :sass].include?(@options[:from])
|
597
|
+
unless [:css, :scss, :sass, :sass2].include?(@options[:from])
|
598
598
|
raise "Unknown format for sass-convert --from: #{name}"
|
599
599
|
end
|
600
600
|
end
|
data/lib/sass/engine.rb
CHANGED
@@ -588,6 +588,7 @@ WARNING
|
|
588
588
|
end
|
589
589
|
|
590
590
|
return silent ? "//" : "/* */" if content.empty?
|
591
|
+
content.each {|l| l.gsub!(/^\* /, '')}
|
591
592
|
content.map! {|l| (l.empty? ? "" : " ") + l}
|
592
593
|
content.first.gsub!(/^ /, '') unless removed_first
|
593
594
|
content.last.gsub!(%r{ ?\*/ *$}, '')
|
@@ -59,10 +59,11 @@ module Sass::Tree
|
|
59
59
|
else
|
60
60
|
content.gsub!(/\n( \*|\/\/)/, "\n ")
|
61
61
|
spaces = content.scan(/\n( *)/).map {|s| s.first.size}.min
|
62
|
+
sep = silent ? "\n//" : "\n *"
|
62
63
|
if spaces >= 2
|
63
|
-
content
|
64
|
+
content.gsub(/\n /, sep)
|
64
65
|
else
|
65
|
-
content.gsub(/\n#{' ' * spaces}/,
|
66
|
+
content.gsub(/\n#{' ' * spaces}/, sep)
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
@@ -251,9 +251,9 @@ SCSS
|
|
251
251
|
|
252
252
|
assert_renders <<SASS, <<SCSS
|
253
253
|
// foo
|
254
|
-
|
255
|
-
|
256
|
-
|
254
|
+
// bar
|
255
|
+
// baz
|
256
|
+
// bang
|
257
257
|
|
258
258
|
foo bar
|
259
259
|
a: b
|
@@ -309,9 +309,9 @@ SCSS
|
|
309
309
|
|
310
310
|
assert_scss_to_sass <<SASS, <<SCSS
|
311
311
|
/* foo
|
312
|
-
|
313
|
-
|
314
|
-
|
312
|
+
* bar
|
313
|
+
* baz
|
314
|
+
* bang
|
315
315
|
|
316
316
|
foo bar
|
317
317
|
a: b
|
@@ -337,9 +337,9 @@ SCSS
|
|
337
337
|
|
338
338
|
assert_renders <<SASS, <<SCSS
|
339
339
|
/* foo
|
340
|
-
|
341
|
-
|
342
|
-
|
340
|
+
* bar
|
341
|
+
* baz
|
342
|
+
* bang
|
343
343
|
|
344
344
|
foo bar
|
345
345
|
a: b
|
@@ -358,8 +358,8 @@ SCSS
|
|
358
358
|
assert_scss_to_sass <<SASS, <<SCSS
|
359
359
|
foo
|
360
360
|
/* foo
|
361
|
-
|
362
|
-
|
361
|
+
* bar
|
362
|
+
* baz
|
363
363
|
a: b
|
364
364
|
SASS
|
365
365
|
foo {
|
@@ -387,8 +387,8 @@ SASS
|
|
387
387
|
def test_immediately_preceding_comments
|
388
388
|
assert_renders <<SASS, <<SCSS
|
389
389
|
/* Foo
|
390
|
-
|
391
|
-
|
390
|
+
* Bar
|
391
|
+
* Baz
|
392
392
|
.foo#bar
|
393
393
|
a: b
|
394
394
|
SASS
|
@@ -401,8 +401,8 @@ SCSS
|
|
401
401
|
|
402
402
|
assert_renders <<SASS, <<SCSS
|
403
403
|
// Foo
|
404
|
-
|
405
|
-
|
404
|
+
// Bar
|
405
|
+
// Baz
|
406
406
|
=foo
|
407
407
|
a: b
|
408
408
|
SASS
|
data/test/sass/css2sass_test.rb
CHANGED
@@ -105,20 +105,20 @@ elephant.rawr
|
|
105
105
|
rampages: excessively
|
106
106
|
|
107
107
|
/* actual multiline
|
108
|
-
|
108
|
+
*comment
|
109
109
|
|
110
110
|
span.turkey
|
111
111
|
isdinner: true
|
112
112
|
|
113
113
|
.turducken
|
114
114
|
/* Sounds funny
|
115
|
-
|
115
|
+
* doesn't it
|
116
116
|
chimera: not_really
|
117
117
|
|
118
118
|
#overhere
|
119
119
|
bored: sorta
|
120
120
|
/* it's for a good
|
121
|
-
|
121
|
+
* cause
|
122
122
|
better_than: thread_pools
|
123
123
|
|
124
124
|
#one_more
|
data/test/sass/engine_test.rb
CHANGED
@@ -1304,6 +1304,18 @@ foo {
|
|
1304
1304
|
CSS
|
1305
1305
|
end
|
1306
1306
|
|
1307
|
+
def test_loud_comments_with_starred_lines
|
1308
|
+
assert_equal(<<CSS, render(<<SASS))
|
1309
|
+
/* This is a comment that
|
1310
|
+
* continues to the second line.
|
1311
|
+
* And even to the third! */
|
1312
|
+
CSS
|
1313
|
+
/* This is a comment that
|
1314
|
+
* continues to the second line.
|
1315
|
+
* And even to the third!
|
1316
|
+
SASS
|
1317
|
+
end
|
1318
|
+
|
1307
1319
|
def test_comment_indentation_at_beginning_of_doc
|
1308
1320
|
assert_equal <<CSS, render(<<SASS)
|
1309
1321
|
/* foo
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-edge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.202
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Weizenbaum
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-04-
|
13
|
+
date: 2010-04-12 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|