{
if ( substr( $type_prev, 0, 1 ) eq '=' ) {
$Kref = $Kprev;
+
+ # Backup to the start of the previous line if it ends in =>
+ # Fixes case b1112.
+ if ( $type_prev eq '=>' ) {
+ my $iline_prev = $rLL->[$Kprev]->[_LINE_INDEX_];
+ my $rK_range = $rlines->[$iline_prev]->{_rK_range};
+ my ( $Kfirst, $Klast ) = @{$rK_range};
+ $Kref = $Kfirst;
+ }
}
}
}
# cause blinkers. See case b1020. It will probably only occur
# in stress testing. For this situation we will only weld if we
# start at a 'good' location. Added 'if' to fix case b1032.
+ # Require blank before certain previous characters to fix b1111.
if ( $starting_ci
&& $rOpts_line_up_parentheses
&& $rOpts_delete_old_whitespace
- && !$rOpts_add_whitespace )
+ && !$rOpts_add_whitespace
+ && defined($Kprev) )
{
my $type_first = $rLL->[$Kfirst]->[_TYPE_];
- my $type_prev = $rLL->[$Kprev]->[_TYPE_];
my $token_first = $rLL->[$Kfirst]->[_TOKEN_];
+ my $type_prev = $rLL->[$Kprev]->[_TYPE_];
+ my $type_pp = 'b';
+ if ( $Kprev >= 0 ) { $type_pp = $rLL->[ $Kprev - 1 ]->[_TYPE_] }
unless (
- $type_prev =~ /^[=\,\.\{\[\(\L]/
+ $type_prev =~ /^[\,\.]/
+ || $type_prev =~ /^[=\{\[\(\L]/ && $type_pp eq 'b'
|| $type_first =~ /^[=\,\.\{\[\(\L]/
|| $type_first eq '||'
|| ( $type_first eq 'k' && $token_first eq 'if'
=over 4
+=item B<Fix some edge welding cases>
+
+Some adjustments in welding coding was made to maintain stability for some
+unusual parameter combinations.
+
+This fixes cases b1111 b1112.
+9 May 2021.
+
=item B<Improve tolerance for welding qw quotes>
The tolerance for welding qw quotes has been update to be the same as used
CroakWinError
)]);
-9 May 2021.
+9 May 2021, ad8870b.
=item B<Correct brace types mismarked by tokenizer, update>
guessed. The formatter has more information and can fix the problem. This
fixes case b1128.
-8 May 2021.
+8 May 2021, b3eaf23.
=item B<Added warning when -ci has to be reduced; ref rt #136415>