From 334f48aa9d4a0ad2ffcf4eeae0228eaf40d546bc Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 25 Jun 2022 15:30:05 -0700 Subject: [PATCH] fix issue b1349 --- dev-bin/run_convergence_tests.pl.data | 37 +++++++++++++++++++++++++++ lib/Perl/Tidy/Formatter.pm | 2 ++ 2 files changed, 39 insertions(+) diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index 1fc66644..d8c3e378 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -9920,6 +9920,43 @@ print to_json({success => $success ? 1 : 0}); --maximum-line-length=60 --extended-continuation-indentation +==> b1349.in <== +# S1 + my ( $database, $primary_id, + $optional_id, $comment ) + = $self + ->_rearrange ( [ qw(DATABASE + PRIMARY_ID + OPTIONAL_ID + COMMENT + ) ], + @args ) ; + +# S2 + my($database,$primary_id, + $optional_id,$comment) + =$self + ->_rearrange( + [ qw(DATABASE + PRIMARY_ID + OPTIONAL_ID + COMMENT + ) + ], + @args ); + + +==> b1349.par <== +--continuation-indentation=7 +--delete-old-whitespace +--extended-line-up-parentheses +--maximum-line-length=37 +--noadd-whitespace +--variable-maximum-line-length +--vertical-tightness=2 +--weld-nested-containers +--break-at-old-method-breakpoints + ==> b1354.in <== # S1 while ( diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 4da4b441..144e0ab1 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -8842,10 +8842,12 @@ sub setup_new_weld_measurements { # - Add ';' to fix case b1139 # - Convert from '$ok_to_weld' to '$new_weld_ok' to fix b1162. # - relaxed constraints for b1227 + # - added skip if type is 'q' for b1349 and b1350 b1351 b1352 b1353 if ( $starting_ci && $rOpts_line_up_parentheses && $rOpts_delete_old_whitespace && !$rOpts_add_whitespace + && $rLL->[$Kinner_opening]->[_TYPE_] ne 'q' && defined($Kprev) ) { my $type_first = $rLL->[$Kfirst]->[_TYPE_]; -- 2.39.5