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

Wrong indentations and blank lines with code #11

Open
lifinsky opened this issue Feb 16, 2013 · 2 comments
Open

Wrong indentations and blank lines with code #11

lifinsky opened this issue Feb 16, 2013 · 2 comments
Assignees

Comments

@lifinsky
Copy link
Contributor

%div
  - [1, 2, 3].each
    %p= it
  %p See, I can count!

Generate:

<div>

    <p>1</p>

    <p>2</p>

    <p>3</p>

  <p>See, I can count!</p>
</div>

Expected:

<div>
  <p>1</p>
  <p>2</p>
  <p>3</p>
  <p>See, I can count!</p>
</div>

Please, generate correct gsp template:

<div>
<% [1, 2, 3].each { %>
  <p><%= it %></p>
<% } %>
  <p>See, I can count!</p>
</div>
@lifinsky
Copy link
Contributor Author

Instead of

<div>
  <% [1, 2, 3].each { %>
      <% if (it) { %>
        <p><%= it %></p>
      <% } %>
    <% } %>
    <p>See, I can count!</p>
</div>

please, generate

<div>
<% [1, 2, 3].each {
      if (it) {
%>
  <p><%= it %></p>
<% }} %>
  <p>See, I can count!</p>
</div>

@raymyers
Copy link
Owner

Thanks for this. I intend to adress it in one of the next two releases.

@ghost ghost assigned raymyers May 3, 2013
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

2 participants