I haven't pushed the change yet. Look for it in 3.0.16. On Mon, Aug 2, 2010 at 11:41 AM, Les <[email protected]> wrote:
> There still seems to be problem (haml 3.0.15, ruby2ruby 1.2.4, erubis > 2.6.6) > > If I start with: > > <table> > <% for university in @universities %> > <tr> > <td></td> > <td></td> > </tr> > <% end %> > </table> > > then html2haml produces: > > %table > - for university in @universities > %tr > %td > %td > </haml:block> > > this always happens in a 'for' block and there always seems to be a > residual </haml:block> that needs to be edited out after the > conversion. > > I assumed this was the same issue that johnny was reporting, but it > seems to have survived the fix! > > Nathan, your work is much appreciated. Thank you for all you do. > > Les > > On Aug 1, 6:09 pm, Nathan Weizenbaum <[email protected]> wrote: > > I've just pushed a fix for this. Turned out Hpricot was getting confused, > > because the fake tags we generate representing ERB blocks aren't allowed > > inside <table> tags. > > > > > > > > On Tue, Jul 20, 2010 at 6:07 PM, johnny <[email protected]> wrote: > > > Hi, > > > I converting the following erb to haml using html2haml 3.1.49 and > > > there seems to be indentation error: > > > > > <div id="product_list"> > > > <h1>Listing products</h1> > > > > > <table> > > > <% @products.each do |product| %> > > > <tr class="<%= cycle('list_line_odd', 'list_line_even') %>"> > > > > > <td> > > > <%= image_tag(product.image_url, :class => 'list_image') %> > > > </td> > > > > > <td class="list_description"> > > > <dl> > > > <dt><%= product.title %></dt> > > > <dd><%= truncate(strip_tags(product.description), > > > :length => 80) %></dd> > > > </dl> > > > </td> > > > > > <td class="list_actions"> > > > <%= link_to 'Show', product %><br/> > > > <%= link_to 'Edit', edit_product_path(product) %><br/> > > > <%= link_to 'Destroy', product, > > > :confirm => 'Are you sure?', > > > :method => :delete %> > > > </td> > > > </tr> > > > <% end %> > > > </table> > > > </div> > > > > > converts to: > > > > > #product_list > > > %h1 Listing products > > > %table > > > - @products.each do |product| > > > %tr{:class => cycle('list_line_odd', 'list_line_even')} -### > > > this and all following lines should be indented, but not! > > > %td > > > = image_tag(product.image_url, :class => 'list_image') > > > %td.list_description > > > %dl > > > %dt= product.title > > > %dd= truncate(strip_tags(product.description), | > > > :length => 80) | > > > %td.list_actions > > > = link_to 'Show', product > > > %br/ > > > = link_to 'Edit', edit_product_path(product) > > > %br/ > > > = link_to 'Destroy', product, | > > > :confirm => 'Are you sure?', | > > > :method => :delete | > > > > > -- > > > 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]<haml%[email protected]>< > haml%[email protected]<haml%[email protected]> > >. > > > For more options, visit this group at > > >http://groups.google.com/group/haml?hl=en. > > -- > 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] <haml%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- 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.
