haml-edge 3.1.52 → 3.1.53

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
- 3.1.52
1
+ 3.1.53
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.52
1
+ 3.1.53
data/lib/haml/html.rb CHANGED
@@ -100,6 +100,23 @@ end
100
100
 
101
101
  require 'hpricot'
102
102
 
103
+ # @private
104
+ HAML_TAGS = %w[haml:block haml:loud haml:silent]
105
+
106
+ Hpricot::ElementContent.keys.each do |k|
107
+ HAML_TAGS.each do |el|
108
+ val = Hpricot::ElementContent[k]
109
+ val[el.hash] = true if val.is_a?(Hash)
110
+ end
111
+ end
112
+
113
+ HAML_TAGS.each do |t|
114
+ Hpricot::ElementContent[t] = {}
115
+ Hpricot::ElementContent.keys.each do |key|
116
+ Hpricot::ElementContent[t][key.hash] = true
117
+ end
118
+ end
119
+
103
120
  module Haml
104
121
  # Converts HTML documents into Haml templates.
105
122
  # Depends on [Hpricot](http://github.com/whymirror/hpricot) for HTML parsing.
@@ -405,6 +405,22 @@ HAML
405
405
  <% ensure %>
406
406
  <p>c</p>
407
407
  <% end %>
408
+ ERB
409
+ end
410
+
411
+ # Regression
412
+
413
+ def test_tag_inside_block
414
+ assert_equal(<<HAML.rstrip, render_erb(<<ERB))
415
+ %table
416
+ - foo.each do
417
+ %tr
418
+ HAML
419
+ <table>
420
+ <% foo.each do %>
421
+ <tr></tr>
422
+ <% end %>
423
+ </table>
408
424
  ERB
409
425
  end
410
426
  end
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: 3.1.52
4
+ version: 3.1.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2010-07-31 00:00:00 -04:00
14
+ date: 2010-08-01 00:00:00 -04:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -289,6 +289,7 @@ files:
289
289
  - test/sass/scss/test_helper.rb
290
290
  - test/sass/templates/_partial.sass
291
291
  - test/sass/templates/alt.sass
292
+ - test/sass/templates/basic.sass
292
293
  - test/sass/templates/bork1.sass
293
294
  - test/sass/templates/bork2.sass
294
295
  - test/sass/templates/bork3.sass
@@ -321,7 +322,6 @@ files:
321
322
  - test/sass/templates/units.sass
322
323
  - test/sass/templates/warn.sass
323
324
  - test/sass/templates/warn_imported.sass
324
- - test/sass/templates/basic.sass
325
325
  - test/test_helper.rb
326
326
  - extra/haml-mode.el
327
327
  - extra/sass-mode.el