haml-edge 2.1.38 → 2.1.39

Sign up to get free protection for your applications and to get access to all the features.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.38
1
+ 2.1.39
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.38
1
+ 2.1.39
data/lib/sass/css.rb CHANGED
@@ -118,7 +118,19 @@ module Sass
118
118
  #
119
119
  # @return [Tree::Node] The parsed rule
120
120
  def rule
121
- return unless rule = @template.scan(/[^\{\};]+/)
121
+ rule = ""
122
+ loop do
123
+ token = @template.scan(/(?:[^\{\};\/\s]|\/[^*])+/)
124
+ if token.nil?
125
+ return if rule.empty?
126
+ break
127
+ end
128
+ rule << token
129
+ break unless @template.match?(/\s|\/\*/)
130
+ whitespace
131
+ rule << " "
132
+ end
133
+
122
134
  rule.strip!
123
135
  directive = rule[0] == ?@
124
136
 
@@ -207,6 +207,29 @@ down_here { yeah: true; }
207
207
  CSS
208
208
  end
209
209
 
210
+ def test_comments_in_selectors
211
+ assert_equal(<<SASS, css2sass(<<CSS))
212
+ .js
213
+ #location-navigation-form .form-submit, #business-listing-form .form-submit, #detailTabs ul, #detailsEnhanced #addTags, #locationSearchList, #moreHoods
214
+ display: none
215
+
216
+
217
+ #navListLeft
218
+ display: none
219
+ SASS
220
+ .js #location-navigation-form .form-submit,
221
+ .js #business-listing-form .form-submit,
222
+ .js #detailTabs ul,
223
+ /* .js #addReview, */
224
+ /* .js #addTags, */
225
+ .js #detailsEnhanced #addTags,
226
+ .js #locationSearchList,
227
+ .js #moreHoods,
228
+ #navListLeft
229
+ { display: none; }
230
+ CSS
231
+ end
232
+
210
233
  private
211
234
 
212
235
  def css2sass(string, opts={})
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.1.38
4
+ version: 2.1.39
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: 2009-06-27 00:00:00 -04:00
13
+ date: 2009-06-28 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -25,9 +25,9 @@ extensions: []
25
25
 
26
26
  extra_rdoc_files:
27
27
  - README.md
28
+ - REVISION
28
29
  - MIT-LICENSE
29
30
  - VERSION
30
- - REVISION
31
31
  - EDGE_GEM_VERSION
32
32
  files:
33
33
  - rails/init.rb
@@ -228,9 +228,9 @@ files:
228
228
  - Rakefile
229
229
  - init.rb
230
230
  - README.md
231
+ - REVISION
231
232
  - MIT-LICENSE
232
233
  - VERSION
233
- - REVISION
234
234
  - EDGE_GEM_VERSION
235
235
  has_rdoc: true
236
236
  homepage: http://haml.hamptoncatlin.com/