my $iline_oc = $outer_closing->[_LINE_INDEX_];
+ my $is_old_weld = ( $iline_oo == $iline_io && $iline_ic == $iline_oc );
+
if ( !$touch_previous_pair ) {
# If this pair is not adjacent to the previous pair (skipped or
}
# DO-NOT-WELD RULE 3:
- # Do not weld if this makes our line too long
- $do_not_weld ||= $excess_length_to_K->($Kinner_opening) >= 0;
+ # Do not weld if this makes our line too long.
+ # Use a tolerance which depends on if the old tokens were welded
+ # (fixes cases b746 b748 b749 b750 b752 b753 b754 b755 b756 b758 b759)
+ $do_not_weld ||= $excess_length_to_K->($Kinner_opening) >=
+ ( $is_old_weld ? $length_tol : 0 );
# DO-NOT-WELD RULE 4; implemented for git#10:
# Do not weld an opening -ce brace if the next container is on a single
if ( $old_breakpoint_to_go[$i_first_comma]
&& $level_comma == $levels_to_go[0] )
{
- my $ibreak = -1;
- my $obp_count = 0;
+ my $ibreak = -1;
+ my $obp_count = 0;
for ( my $ii = $i_first_comma - 1 ; $ii >= 0 ; $ii -= 1 ) {
if ( $old_breakpoint_to_go[$ii] ) {
$obp_count++;
=over 4
+=item B<Modify tolerance in testing for welds>
+
+Random testing with unusual parameters produced some blinking weld states which
+were fixed by modifying a tolerance used in a line length test. The following
+cases were fixed with this update:
+
+b746 b748 b749 b750 b752 b753 b754 b755 b756 b758 b759 b771 b772 b773 b774
+b782 b783 b784 b785 b786
+
+9 Feb 2021.
+
=item B<Modified rule for breaking lines at old commas>
Random testing produced some blinking cases resulting from the treatment of old
b064 b065 b068 b210 b747
This change has no effect on scripts with normal parameter values.
-9 Feb 2021.
+9 Feb 2021, 5c23661.
=item B<Restrict references to old line breaks>