Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
773eb07
commit 3964285
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#### Allow custom "else if"-like blocks with block params (#13930 by @jamescdavis) | ||
|
||
#13507 added support for custom block keywords used with `else`, but failed to allow block params. This updates printer-glimmer to allow block params with custom "else if"-like blocks. | ||
|
||
<!-- prettier-ignore --> | ||
```hbs | ||
{{! Input }} | ||
{#when isAtWork as |work|}} | ||
Ship that | ||
{{work}}! | ||
{{else when isReading as |book|}} | ||
You can finish | ||
{{book}} | ||
eventually... | ||
{{else}} | ||
Go to bed! | ||
{{/when}} | ||
{{! Prettier stable }} | ||
{{#when isAtWork as |work|}} | ||
Ship that | ||
{{work}}! | ||
{{else when isReading}} | ||
You can finish | ||
{{book}} | ||
eventually... | ||
{{else}} | ||
Go to bed! | ||
{{/when}} | ||
{{! Prettier main }} | ||
{#when isAtWork as |work|}} | ||
Ship that | ||
{{work}}! | ||
{{else when isReading as |book|}} | ||
You can finish | ||
{{book}} | ||
eventually... | ||
{{else}} | ||
Go to bed! | ||
{{/when}} | ||
``` |