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].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to