Skip to content

Latest commit

 

History

History
42 lines (38 loc) · 842 Bytes

File metadata and controls

42 lines (38 loc) · 842 Bytes

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.

{{! 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}}