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

Nested if / else bug #2

Closed
dcyriller opened this issue Apr 24, 2019 · 1 comment
Closed

Nested if / else bug #2

dcyriller opened this issue Apr 24, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@dcyriller
Copy link

dcyriller commented Apr 24, 2019

Description

Running the script, I ran into a bug with nested if / else.

Reproduction

Before:

if inGoodMood
  if inVeryGoodMood
    h1 hiii
  else
    h1 hi
else
  if inVeryBadMood
    span :unamused:
h1 bye

After:

{{#if inGoodMood}}
  {{#if inVeryGoodMood}}
    <h1>
      hiii
    </h1>
  {{else}}
    <h1>
      hi
    </h1>
  {{/if}}
{{else if inVeryBadMood}}
  <span>
    :unamused:
  </span>
<h1>
  bye
</h1>
{{/if}}

(see https://github.com/dcyriller/__emblem-to-hbs-nested-if)

@Turbo87 Turbo87 added the bug Something isn't working label Apr 24, 2019
@dcyriller
Copy link
Author

I've opened a PR in prettier to fix the issue: prettier/prettier#6080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants