Skip to content

Commit

Permalink
add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescdavis committed Sep 22, 2022
1 parent 63a5ca7 commit 9f09c67
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions changelog_unreleased/handlebars/13507.md
@@ -0,0 +1,33 @@
#### [handlebars] correctly format custom "else if" blocks (#13507 by @jamescdavis)

A template transform can be used to create custom block keywords that behave similar to `if`. This updates printer-glimmer to correctly recognize and format the "else if" case when "if" is a custom keyword.

<!-- prettier-ignore -->
```hbs
{{! Input }}
{{#when isAtWork}}
Ship that code!
{{else when isReading}}
You can finish War and Peace eventually...
{{else}}
Go to bed!
{{/when}}
{{! Prettier stable }}
{{#when isAtWork}}
Ship that code!
{{else}}{{#when isReading}}
You can finish War and Peace eventually...
{{else}}
Go to bed!
{{/when}}{{/when}}
{{! Prettier main }}
{{#when isAtWork}}
Ship that code!
{{else when isReading}}
You can finish War and Peace eventually...
{{else}}
Go to bed!
{{/when}}
```

0 comments on commit 9f09c67

Please sign in to comment.