Commit 6492e36
Preserve columnized arrays, even if they have a single column
This change preservers existing whitespace for arrays where each element
is on a separate line, e.g.:
new int[]{
1,
2,
3,
};
Previously this was only done if each row had two or more elements:
new int[]{
1, 2,
3, 4,
5, 6,
};
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=1551283551 parent 5b59a76 commit 6492e36
File tree
3 files changed
+58
-2
lines changed- core/src
- main/java/com/google/googlejavaformat/java
- test/resources/com/google/googlejavaformat/java/testdata
3 files changed
+58
-2
lines changedLines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| |||
2889 | 2889 | | |
2890 | 2890 | | |
2891 | 2891 | | |
2892 | | - | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
2893 | 2896 | | |
2894 | 2897 | | |
2895 | 2898 | | |
| |||
2934 | 2937 | | |
2935 | 2938 | | |
2936 | 2939 | | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
2937 | 2957 | | |
2938 | 2958 | | |
2939 | 2959 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments