From d20ea80fad452bee850de8cba83d2a18f6a665f7 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 2 Apr 2021 07:34:35 -0700 Subject: [PATCH] Avoid conflict of -bli and -xci --- lib/Perl/Tidy/Formatter.pm | 6 ++++++ local-docs/BugLog.pod | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index de2fad0f..32e09911 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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 ); diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index bdfaab35..1cdcb759 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -1,3 +1,19 @@ + +=head1 Issues fixed after release 20210402 + +=over 4 + +=item B + +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 -- 2.39.5