diff --git a/changelog_unreleased/handlebars/13930.md b/changelog_unreleased/handlebars/13930.md new file mode 100644 index 000000000000..6e824a32e02c --- /dev/null +++ b/changelog_unreleased/handlebars/13930.md @@ -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. + + +```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}} +```