Avoid conflict of -bli and -xci
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Apr 2021 14:34:35 +0000 (07:34 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Apr 2021 14:34:35 +0000 (07:34 -0700)
lib/Perl/Tidy/Formatter.pm
local-docs/BugLog.pod

index de2fad0fc12781ff9e6c73b9d5287744dcfae11f..32e099119da7450a312c94fc6f10cef961c67f6c 100644 (file)
@@ -8442,6 +8442,7 @@ sub extended_ci {
     my $rseqno_controlling_my_ci = $self->[_rseqno_controlling_my_ci_];
     my $rlines                   = $self->[_rlines_];
     my $rno_xci_by_seqno         = $self->[_rno_xci_by_seqno_];
+    my $ris_bli_container        = $self->[_ris_bli_container_];
 
     my %available_space;
 
@@ -8534,6 +8535,11 @@ sub extended_ci {
             next;
         }
 
+        # Skip if this is a -bli container (this fixes case b1065)
+        if ( $ris_bli_container->{$seqno} ) {
+            next;
+        }
+
         # We are looking for opening container tokens with ci
         next unless ( defined($K_opening) && $KK == $K_opening );
 
index bdfaab35aa818daaf39231ab494e1f893aa0287c..1cdcb7597b122f6a6a57c0f4e4362937978113ae 100644 (file)
@@ -1,3 +1,19 @@
+
+=head1 Issues fixed after release 20210402
+
+=over 4
+
+=item B<Avoid conflict of -bli and -xci>
+
+Random testing produced a case with the combination -bli and -xci which did not
+converge. This was fixed by turning off -xci for braces under -bli control.
+
+This fixes case b1065.
+
+2 Apr 2021.
+
+=back
+
 =head1 Issues fixed after release 20210111
 
 =over 4
@@ -13,7 +29,7 @@ which do not themselves contain broken containers.
 This fixes cases 
 b1033 b1036 b1037 b1038 b1042 b1043 b1044 b1045 b1046 b1047 b1051 b1052 b1061.
 
-30 Mar 2021.
+30 Mar 2021, 2b05051.
 
 =item B<Fix rule for welding with barewords>