mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Fix for attribute methods
See 0ea157839f
The call to `merge` isn't necessary since the hashes are merged in the
call to `Buffer#attributes` with `merge_attrs`
This commit can result in different behaviour in certain case, since
the hashes are being merged with `merge_attrs` which handles `class` and
`id` attributes. Previously the value from the 'old style' would replace
the value from the 'new style`
e.g.
%p.the_class{:class => old_attrs}(class = new_attrs)
(where `old_attrs` and `new_attrs` are methods that return 'old' or
'new')
Previously this would result in:
<p class='old the_class'></p>
with this commit the result is:
<p class='new old the_class'></p>
This commit is contained in:
parent
0ea157839f
commit
e475b015d3
1 changed files with 1 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]
|
||||
|
|
Loading…
Add table
Reference in a new issue