From: Steve Hancock Date: Mon, 11 Oct 2021 13:25:47 +0000 (-0700) Subject: fix b1228, rare formatting instability X-Git-Tag: 20211029~27 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=396b13942cc4ce8c8ec80bfe9dd8624cc31aeb78;p=perltidy.git fix b1228, rare formatting instability --- diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index cebf06fc..74988faf 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -7729,6 +7729,23 @@ foreach$n(qw( msm ali )) --stack-opening-paren --weld-nested-containers +==> b1228.in <== +# S1 +$obj + = { + foo => sub { "bar" ; } + } ; + +# S2 +$obj= {foo => sub { "bar" ; } +} ; + +==> b1228.par <== +--noadd-whitespace +--continuation-indentation=5 +--maximum-line-length=29 +--want-break-before='=' + ==> b131.in <== unless ( open( SCORE, "+>>$Score_File" ) ) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index a0ac2de6..201f2d03 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -11911,11 +11911,6 @@ EOM { $rbrace_follower = undef; $keep_going = 1; - - # Keep the break if container is fully broken - my $Ko = $K_opening_container->{$p_seqno}; - $self->set_forced_breakpoint($max_index_to_go) - if ( $Ko < $K_first ); } } }