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
66d9ab6
commit e88b6c0
Showing
1 changed file
with
57 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,57 @@ | ||
#### Group params in opening block statements (#14067 by @jamescdavis) | ||
|
||
This is a follow-up to #13930 to establish wrapping consistency between opening block statements and else blocks by | ||
grouping params in opening blocks. This causes params to break to a new line together and not be split across lines | ||
unless the length of params exceeds the print width. This also updates the else block wrapping to behave exactly the | ||
same as opening blocks. | ||
|
||
<!-- prettier-ignore --> | ||
```hbs | ||
{{! Input }} | ||
{{#block param param param param param param param param param param as |blockParam|}} | ||
Hello | ||
{{else block param param param param param param param param param param as |blockParam|}} | ||
There | ||
{{/block}} | ||
{{! Prettier stable }} | ||
{{#block | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
as |blockParam| | ||
}} | ||
Hello | ||
{{else block param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param | ||
param}} | ||
There | ||
{{/block}} | ||
{{! Prettier main }} | ||
{{#block | ||
param param param param param param param param param param | ||
as |blockParam| | ||
}} | ||
Hello | ||
{{else block | ||
param param param param param param param param param param | ||
as |blockParam| | ||
}} | ||
There | ||
{{/block}} | ||
``` |