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

Auto indent not indenting scopes in html.eex files #65

Open
kuon opened this issue May 24, 2016 · 1 comment
Open

Auto indent not indenting scopes in html.eex files #65

kuon opened this issue May 24, 2016 · 1 comment
Assignees

Comments

@kuon
Copy link

kuon commented May 24, 2016

For example, the following code is the result of auto indent with the plugin:

<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
  <p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>

<div class="form-group">
  <%= label f, :name, class: "control-label" %>
  <%= text_input f, :name, class: "form-control" %>
  <%= error_tag f, :name %>
</div>

<div class="form-group">
  <%= submit "Submit", class: "btn btn-primary" %>
</div>
<% end %>

but it should be formatted like so:

<%= form_for @changeset, @action, fn f -> %>
  <%= if @changeset.action do %>
    <div class="alert alert-danger">
      <p>Oops, something went wrong! Please check the errors below.</p>
    </div>
  <% end %>

  <div class="form-group">
    <%= label f, :name, class: "control-label" %>
    <%= text_input f, :name, class: "form-control" %>
    <%= error_tag f, :name %>
  </div>

  <div class="form-group">
    <%= submit "Submit", class: "btn btn-primary" %>
  </div>
<% end %>

<%= .... %> with a corresponding <% end %> should be indented.

@keathley
Copy link
Contributor

Thanks! I'll take a look at this.

@keathley keathley self-assigned this May 24, 2016
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