Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain tags can break if/else blocks #65

Open
epitron opened this issue Jan 29, 2016 · 0 comments
Open

Certain tags can break if/else blocks #65

epitron opened this issue Jan 29, 2016 · 0 comments

Comments

@epitron
Copy link

epitron commented Jan 29, 2016

Using html2haml 2.0 on this snippet:

<p>
  <% if condition %>
    <p>
      <ul>
        ul text
      </ul>
      p text
    </p>
    if text
  <% else %>
    else text
  <% end %>
</p>

Outputs this HAML:

%p
  - if condition
    %p
    %ul
      ul text
    p text
if text
- else
  else text

You can see that everything after the <ul> tag is at the wrong level of indentation for some reason. The - else block ends up being broken, causing a syntax error.

Very strange...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant