If you're converting a file with ERB tags, make sure you use the --erb flag. Otherwise the strange syntax may confuse the parser.
On Fri, May 20, 2011 at 11:39 AM, JESii <jes...@gmail.com> wrote: > I'm on haml 3.1.1 and used the CLI html2haml to convert some existing > files. This is the input: > ===== > <!DOCTYPE html> > <html> > <head> > <title>Arborwell Web Forms</title> > <%= stylesheet_link_tag :all %> > <%= javascript_include_tag :defaults %> > <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %> > <%= stylesheet_link_tag 'blueprint/print', :media => 'print' %> > <%= stylesheet_link_tag 'custom', :media => 'screen' %> > <!--[if lt IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-- > > > <%= csrf_meta_tag %> > </head> > <body> > <div class="container"> > <header> > <%- logo = image_tag("arborwell_logo.jpg", :alt => "Arborwell Web > Forms", :class => "round", :style => "width:25%; height:15%;") %> > <%= link_to logo, root_path %> > <nav class="round"> > <ul> > <li><%= link_to "Home", :welcome_index %></li> > <li><%= link_to "Incident Report", :incident_reports %></li> > <li><%= link_to "Check Request", '#' %></li> > <li><%= link_to "Purchase Requisition", '#' %></li> > <li><%= link_to "Quote Request", '#' %></li> > </ul> > </nav> > </header> > <section class="round"> > <%= yield %> > </section> > </div> > > </body> > </html> > ===== > This is the output: > !!! > %html > %head > %title Arborwell Web Forms > <%= stylesheet_link_tag :all %> > <%= javascript_include_tag :defaults %> > <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %> > <%= stylesheet_link_tag 'blueprint/print', :media => 'print' %> > <%= stylesheet_link_tag 'custom', :media => 'screen' %> > /[if lt IE 8] <%= stylesheet_link_tag 'blueprint/ie' %> > <%= csrf_meta_tag %> > %body > .container > %header > <%- logo = image_tag("arborwell_logo.jpg", :alt => "Arborwell > Web Forms", :class => "round", :style => "width:25%; height:15%;") %> > <%= link_to logo, root_path %> > %nav.round > %ul > %li <%= link_to "Home", :welcome_index %> > %li <%= link_to "Incident Report", :incident_reports %> > %li <%= link_to "Check Request", '#' %> > %li <%= link_to "Purchase Requisition", '#' %> > %li <%= link_to "Quote Request", '#' %> > %section.round > <%= yield %> > ===== > > Notice the misplacement of the %nav.round element -- the original erb > file works just fine, but the converted haml file does not: the > navigation stuff appears below the logo (I'm using blueprintCSS). > > Interestingly enough, the website html2haml.heroku.com works just fine > with this conversion. > > ...jon > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to haml@googlegroups.com. > To unsubscribe from this group, send email to > haml+unsubscr...@googlegroups.com. > 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 haml@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.