public
Rubygem
Fork of nex3/haml
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/chriseppstein/haml.git
Fixing an output-indentation bug with self-closed tags. Thanks to Nicolas 
Sanguinetti for pointing this out.

git-svn-id: svn://hamptoncatlin.com/haml/tags/stable@729 
7063305b-7217-0410-af8c-cdc13e5119b9
nex3 (author)
Thu Jan 17 10:41:27 -0800 2008
commit  39c6d41f1bc810275720ce1eed57cc1f142af325
tree    d3698cb47d06134f550331fc910cae62371bf61a
parent  75be1d1fbf47fd9bfbc2a66ad201ad14d983344d
...
115
116
117
118
 
119
120
121
...
115
116
117
 
118
119
120
121
0
@@ -115,7 +115,7 @@ module Haml
0
         else
0
           @buffer << "\n#{tabs(@real_tabs+1)}#{content}\n#{tabs(@real_tabs)}</#{name}>\n"
0
         end
0
- else
0
+ elsif !atomic
0
         @real_tabs += 1
0
       end
0
     end
...
173
174
175
 
 
 
 
176
177
178
...
173
174
175
176
177
178
179
180
181
182
0
@@ -173,6 +173,10 @@ class EngineTest < Test::Unit::TestCase
0
     assert_equal("<p a='b2c'>\n</p>\n", render("%p{:a => 'b' + (1 + 1).to_s + 'c'}"))
0
   end
0
 
0
+ def test_dynamic_attrs_with_self_closed_tag
0
+ assert_equal("<a b='2' />\nc\n", render("%a{'b' => 1 + 1}/\n= 'c'\n"))
0
+ end
0
+
0
   def test_rec_merge
0
     hash1 = {1=>2, 3=>{5=>7, 8=>9}}
0
     hash2 = {4=>5, 3=>{5=>2, 16=>12}}

Comments

    No one has commented yet.