OLD | NEW |
(Empty) | |
| 1 40 columns | |
| 2 >>> trailing line comment after split |
| 3 someMethod(argument1, argument2, // comment |
| 4 argument3); |
| 5 <<< |
| 6 someMethod( |
| 7 argument1, |
| 8 argument2, // comment |
| 9 argument3); |
| 10 >>> trailing line comment after non-split |
| 11 someMethod(argument1, argument2 // comment |
| 12 ); |
| 13 <<< |
| 14 someMethod( |
| 15 argument1, argument2 // comment |
| 16 ); |
| 17 >>> inside list literal |
| 18 ['item' // comment |
| 19 ]; |
| 20 <<< |
| 21 [ |
| 22 'item' // comment |
| 23 ]; |
| 24 >>> inside argument list |
| 25 foo(1 /* bang */, 2); |
| 26 <<< |
| 27 foo(1 /* bang */, 2); |
| 28 >>> no space between "(" and ")" and block comment |
| 29 foo( /* */ ) {} |
| 30 <<< |
| 31 foo(/* */) {} |
| 32 >>> space on left between block comment and "," |
| 33 foo(1,/* a */ 2 /* b */ , 3); |
| 34 <<< |
| 35 foo(1, /* a */ 2 /* b */, 3); |
| 36 >>> space between block comment and other tokens |
| 37 var/**/a/**/=/**/1/**/+/**/2; |
| 38 <<< |
| 39 var /**/ a /**/ = /**/ 1 /**/ + /**/ 2; |
| 40 >>> preserve space before comment in expression |
| 41 foo && |
| 42 |
| 43 // comment |
| 44 bar; |
| 45 <<< |
| 46 foo && |
| 47 |
| 48 // comment |
| 49 bar; |
| 50 >>> preserve comments before a sequence of operators |
| 51 1 /* a */ && 2 /* b */ && 3; |
| 52 <<< |
| 53 1 /* a */ && 2 /* b */ && 3; |
| 54 >>> no trailing space after operand preceding comment |
| 55 a |
| 56 // comment |
| 57 && b; |
| 58 <<< |
| 59 a |
| 60 // comment |
| 61 && |
| 62 b; |
| 63 >>> hard line caused by a comment before a nested line |
| 64 someFunction(// |
| 65 someExtremelyLongArgumentName).clamp(); |
| 66 <<< |
| 67 someFunction(// |
| 68 someExtremelyLongArgumentName) |
| 69 .clamp(); |
| 70 >>> line comment before binary operator |
| 71 { |
| 72 // comment |
| 73 1 + 2; |
| 74 } |
| 75 <<< |
| 76 { |
| 77 // comment |
| 78 1 + 2; |
| 79 } |
| 80 >>> force named args to split on line comment in positional |
| 81 function(argument, // |
| 82 argument, named: argument, another: argument); |
| 83 <<< |
| 84 function( |
| 85 argument, // |
| 86 argument, |
| 87 named: argument, |
| 88 another: argument); |
OLD | NEW |