From 396b13942cc4ce8c8ec80bfe9dd8624cc31aeb78 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Mon, 11 Oct 2021 06:25:47 -0700 Subject: [PATCH] fix b1228, rare formatting instability --- dev-bin/run_convergence_tests.pl.data | 17 +++++++++++++++++ lib/Perl/Tidy/Formatter.pm | 5 ----- 2 files changed, 17 insertions(+), 5 deletions(-) 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 ); } } } -- 2.39.5