The main problem of html2haml:
#foo.bar{"id" => "foo", "class" => "bar"}
So, we have redundant attributes in the hash. It tries to remove "id" and
"class" attributes after outputting, but it simply doesn't work because the
attributes Hash in Hpricot is frozen in some way. You have to use
remove_attribute.
My patch fixes it:
#foo.bar
But when there actually are attributes, at least it outputs them more
nicely:
%input{ :type => "text", :name => "login" }/
... instead of usual Hash#inspect (blah):
%input{"type" => "text", "name" => "login"}/
Also, the patch adds several basic unit tests for html2haml functionality,
old one and this new stuff.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---