# add any bias set by sub scan_list at old comma break points
$bond_str += $bond_strength_to_go[$i];
- # Avoid breaking at a useless terminal comma
- $bond_str += 0.001 if ( $next_nonblank_type eq '}' );
}
# bias left token
# (2) there was exactly one old break before the first comma break
# (3) OLD: there are multiple old comma breaks
# (3) NEW: there are one or more old comma breaks (see return example)
+ # (4) the first comma is at the starting level ...
+ # ... fixes cases b064 b065 b068 b210 b747
#
# For example, we will follow the user and break after
# 'print' in this snippet:
# ;
#
my $i_first_comma = $comma_index[$dd]->[0];
- if ( $old_breakpoint_to_go[$i_first_comma] ) {
- my $level_comma = $levels_to_go[$i_first_comma];
+ my $level_comma = $levels_to_go[$i_first_comma];
+ if ( $old_breakpoint_to_go[$i_first_comma]
+ && $level_comma == $levels_to_go[0] )
+ {
my $ibreak = -1;
my $obp_count = 0;
for ( my $ii = $i_first_comma - 1 ; $ii >= 0 ; $ii -= 1 ) {
=over 4
+=item B<Modified rule for breaking lines at old commas>
+
+Random testing produced some blinking cases resulting from the treatment of old
+line breaks at commas not contained within containers. The following cases
+were fixed with this update:
+
+b064 b065 b068 b210 b747
+
+This change has no effect on scripts with normal parameter values.
+9 Feb 2021.
+
=item B<Restrict references to old line breaks>
A number of cases of blinking states were traced to code which biased
b320 b321 b322 b323 b324 b325 b326 b327 b329 b330 b331 b332 b333 b334 b335 b336
b337 b338 b339 b340 b341 b342 b343 b344 b345 b346 b347 b348 b349
-8 Feb 2021.
-
-=item B<Avoid breaking a line after an optional ending comma>
-
-Given the following input line with a length of 81, the default formatting
-will break at the last comma:
-
- emit_subroutine_test( $test_file, $name, $capitalization_scheme, $failures );
-
- # perltidy -sil=1 -iob
- emit_subroutine_test( $test_file, $name, $capitalization_scheme,
- $failures );
-
-But if the input line has a comma at the end of the list
-
- emit_subroutine_test( $test_file, $name, $capitalization_scheme, $failures, );
-
-# Then the break is at the last comma
-
- # OLD: perltidy -sil=1 -iob
- emit_subroutine_test( $test_file, $name, $capitalization_scheme, $failures,
- );
-
-This update causes the break to be at the previous comma, so that the output
-is similar to the output without the needless ending comma:
-
- # NEW: perltidy -sil=1 -iob
- emit_subroutine_test( $test_file, $name, $capitalization_scheme,
- $failures, );
-
-8 Feb 2021.
+8 Feb 2021, 66be455.
=item B<Fix rare problem involving interaction of -olbn=n and -wn flags>