haml-edge 2.3.201 → 2.3.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.201
1
+ 2.3.202
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.201
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}/, "\n ")
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
- bar
255
- baz
256
- bang
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
- bar
313
- baz
314
- bang
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
- bar
341
- baz
342
- bang
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
- bar
362
- baz
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
- Bar
391
- Baz
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
- Bar
405
- Baz
404
+ // Bar
405
+ // Baz
406
406
  =foo
407
407
  a: b
408
408
  SASS
@@ -105,20 +105,20 @@ elephant.rawr
105
105
  rampages: excessively
106
106
 
107
107
  /* actual multiline
108
- comment
108
+ *comment
109
109
 
110
110
  span.turkey
111
111
  isdinner: true
112
112
 
113
113
  .turducken
114
114
  /* Sounds funny
115
- doesn't it
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
- cause
121
+ * cause
122
122
  better_than: thread_pools
123
123
 
124
124
  #one_more
@@ -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.201
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-11 00:00:00 -04:00
13
+ date: 2010-04-12 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency