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

[Code formatting] {{else if}} doesn't work in handlebars files #32916

Closed
shijistar opened this issue Aug 22, 2017 · 1 comment
Closed

[Code formatting] {{else if}} doesn't work in handlebars files #32916

shijistar opened this issue Aug 22, 2017 · 1 comment
Assignees
Labels
html HTML support issues

Comments

@shijistar
Copy link

shijistar commented Aug 22, 2017

  • VSCode Version: 1.15.1
  • OS Version: Ubuntu 16.04 LTS

Steps to Reproduce:

  1. Try to format the following code in hbs (Ember template) files
{{#if conditionA}}
    Something when conditionA comes true
{{else if conditionB}}
     Otherwise, something when conditionB comes true
{{/if}}

Expected:
Code indent like above.
Actually:

  {{#if conditionA}}
    Something when conditionA comes true {{else if conditionB}} Otherwise, something when conditionB comes true
  {{/if}}

Reason:
{{else if}} direction is not recognized as a block statement but regular handlebars tags.

Reproduces without extensions: Yes

@Tyriar Tyriar added the javascript JavaScript support issues label Aug 22, 2017
@mjbvz mjbvz added html HTML support issues and removed javascript JavaScript support issues labels Aug 22, 2017
@mjbvz mjbvz assigned aeschli and unassigned mjbvz Aug 22, 2017
@aeschli
Copy link
Contributor

aeschli commented Aug 31, 2017

We use http://jsbeautifier.org/ as the formatter. It is foremost a HTML formatter, but has some support for handlebars.
I suggest to file this as a feature request there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
html HTML support issues
Projects
None yet
Development

No branches or pull requests

4 participants