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 3c9f279
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions changelog_unreleased/handlebars/13507.md
@@ -0,0 +1,35 @@
#### [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 glimmer-printer 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 3c9f279

Please sign in to comment.