_rhas_ternary_ => $i++,
_ris_excluded_lp_container_ => $i++,
_rwant_reduced_ci_ => $i++,
+ _rno_xci_by_seqno_ => $i++,
_ris_bli_container_ => $i++,
_rparent_of_seqno_ => $i++,
_rchildren_of_seqno_ => $i++,
$self->[_rhas_ternary_] = {};
$self->[_ris_excluded_lp_container_] = {};
$self->[_rwant_reduced_ci_] = {};
+ $self->[_rno_xci_by_seqno_] = {};
$self->[_ris_bli_container_] = {};
$self->[_rparent_of_seqno_] = {};
$self->[_rchildren_of_seqno_] = {};
my $rlines = $self->[_rlines_];
my $rtype_count_by_seqno = $self->[_rtype_count_by_seqno_];
my $rlec_count_by_seqno = $self->[_rlec_count_by_seqno_];
+ my $rno_xci_by_seqno = $self->[_rno_xci_by_seqno_];
my $length_tol =
max( 1, $rOpts_continuation_indentation, $rOpts_indent_columns );
# - this list contains a broken list with line-ending comma, or
# - this list is contained in a broken list
elsif ( $break_option == 2 ) {
+
my $ok_to_break = $has_list_with_lec;
if ( !$ok_to_break ) {
+
+ # Turn off -xci if -bbx=2 and this container has a sublist but
+ # not a broken sublist. This avoids creating blinkers. The
+ # problem is that -xci can cause one-line lists to break open,
+ # and thereby creating formatting instability.
+ # This fixes cases b1033 b1036 b1037 b1038 b1042 b1043 b1044
+ # b1045 b1046 b1047 b1051 b1052 b1061.
+ if ($has_list) { $rno_xci_by_seqno->{$seqno} = 1 }
+
my $parent = $rparent_of_seqno->{$seqno};
$ok_to_break = $self->is_list_by_seqno($parent);
}
+
next unless ($ok_to_break);
}
my $ris_seqno_controlling_ci = $self->[_ris_seqno_controlling_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 %available_space;
next;
}
+ # Skip if requested by -bbx to avoid blinkers
+ if ( $rno_xci_by_seqno->{$seqno} ) {
+ next;
+ }
+
# We are looking for opening container tokens with ci
next unless ( defined($K_opening) && $KK == $K_opening );
=over 4
+=item B<Avoid conflict of -bbp=2 and -xci>
+
+Random testing produced a number of cases of unstable formatting when both -xci
+and -bbp=2 or similar flags were set. The problem was that -xci can cause
+one-line blocks to break open, causing the -bbp=2 flag to continually switch
+formatting. The problem is fixed by locally turning off -xci at containers
+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.
+
=item B<Fix rule for welding with barewords>
Random testing produced a case which was not converging due to a rule
This fixes cases b1057 b1064.
-29 Mar 2021.
+29 Mar 2021, d677082.
=item B<Fix conflict between -wba='||' and -opr>
parameters. The problem is resolved by giving priority to the '||'. This
fixes case b1060.
-29 Mar 2021
+29 Mar 2021, 6921a7d.
=item B<Follow user requests better to break before operators>