]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix b1228, rare formatting instability
authorSteve Hancock <perltidy@users.sourceforge.net>
Mon, 11 Oct 2021 13:25:47 +0000 (06:25 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Mon, 11 Oct 2021 13:25:47 +0000 (06:25 -0700)
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm

index cebf06fc196a63bbafa9d8c7c84b2536ff5394a4..74988faff6c3faf2dfcbc327ef3779ef3392ddce 100644 (file)
@@ -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" ) )
index a0ac2de66ed45673525e11afaa59c5942a073068..201f2d037440b8ff4f37df02aa77a9523c309822 100644 (file)
@@ -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 );
                             }
                         }
                     }