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

Handlebars support #13

Closed
Glavin001 opened this issue Jun 12, 2014 · 4 comments
Closed

Handlebars support #13

Glavin001 opened this issue Jun 12, 2014 · 4 comments

Comments

@Glavin001
Copy link
Owner

See anaptfox/atom-beautifier#4

In progress 😄..

@Glavin001
Copy link
Owner Author

  • Defaults to enabled when current grammar is Handlebars
    Enabled being:
    defaultOptions.indent_handlebars = true; // jshint ignore: line

@Glavin001
Copy link
Owner Author

Working!

Before:

{{#if}}
{{#each}}
{{#if}}
content
{{/if}}
{{#if}}
content
{{/if}}
{{/each}}
{{/if}}

After:

{{#if}}
  {{#each}}
    {{#if}}
      content
    {{/if}}
    {{#if}}
      content
    {{/if}}
  {{/each}}
{{/if}}

@julkue
Copy link

julkue commented May 7, 2016

Still not working correctly for me. Assuming you have the following (correctly formatted code):

{{> header}}

<div class="container">
    <div class="row">
        <main class="col-xs-12">
            {{{contents}}}
        </main>
    </div>
</div>

{{> footer}}

It will be formatted to:

{{> header}}
    <div class="container">
        <div class="row">
            <main class="col-xs-12">
                {{{contents}}}
            </main>
        </div>
    </div>
    {{> footer}}

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