mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
commit
c0b1d236a8
2 changed files with 6 additions and 1 deletions
|
@ -195,7 +195,7 @@ END
|
|||
elsif attributes_hashes.size == 1
|
||||
attributes_hashes = ", #{attributes_hashes.first}"
|
||||
else
|
||||
attributes_hashes = ", (#{attributes_hashes.join(").merge(")})"
|
||||
attributes_hashes = ", #{attributes_hashes.join(", ")}"
|
||||
end
|
||||
|
||||
push_merged_text "<#{t[:name]}", 0, !t[:nuke_outer_whitespace]
|
||||
|
|
|
@ -214,6 +214,11 @@ HAML
|
|||
render(".no_attributes{:nil => nil}").chomp)
|
||||
end
|
||||
|
||||
def test_attribute_method_with_both_attrib_styles_and_non_static_hashes
|
||||
assert_equal("<div baz='qux' foo='bar' zig='zag'></div>",
|
||||
render("%div{{:foo => 'bar'}, :baz => 'qux'}(zig = val)", :locals => {:val => 'zag'}).chomp)
|
||||
end
|
||||
|
||||
def test_strings_should_get_stripped_inside_tags
|
||||
assert_equal("<div class='stripped'>This should have no spaces in front of it</div>",
|
||||
render(".stripped This should have no spaces in front of it").chomp)
|
||||
|
|
Loading…
Add table
Reference in a new issue