Commit 66cac37
Disallow line breaks in completely empty array and dict exprs.
There's no reason to have a newline between the square brackets when there's nothing, other than a `:` for dict exprs, between the brackets.1 parent c52e0d2 commit 66cac37
File tree
3 files changed
+40
-4
lines changed- Sources/SwiftFormatPrettyPrint
- Tests/SwiftFormatPrettyPrintTests
3 files changed
+40
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | | - | |
743 | | - | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
744 | 746 | | |
745 | 747 | | |
746 | 748 | | |
| |||
778 | 780 | | |
779 | 781 | | |
780 | 782 | | |
781 | | - | |
782 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
783 | 792 | | |
784 | 793 | | |
785 | 794 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
10 | 19 | | |
| |||
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
23 | 39 | | |
24 | 40 | | |
25 | 41 | | |
| |||
0 commit comments