Skip to content

erb2slim doesn't handle ERB fragments within a tag definition properly #20

@MrJoy

Description

@MrJoy

This:

<tr>
  <td class="firstcol <%= ' first_row_cell'.html_safe if params[:iphone] -%>">
    <%= f.label :login, "Email" %>
  </td>
  <td <%= 'class="first_row_cell"'.html_safe if params[:iphone] -%> >
    <%= f.text_field 'login', :value => base_login, :class => 'textfield', :placeholder => 'example@gmail.com' %> 
  </td>
</tr>

Becomes:

tr
  |  <td class="firstcol 
  = ' first_row_cell'.html_safe if params[:iphone] -
  | "> 
  = f.label :login, "Email"
  |  <td 
  = 'class="first_row_cell"'.html_safe if params[:iphone] -
  |  > 
  = f.text_field 'login', :value => base_login, :class => 'textfield', :placeholder => 'example@gmail.com'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions