--weld-nested-containers
--vertical-tightness=2
+==> b1185.in <==
+# S1
+ my $visible_items = {
+ map { $_->itemnumber => $_ }
+ $biblio->items
+ ->filter_by_visible_in_opac
+ ( { patron => $patron } )
+ ->as_list
+ };
+#S2
+ my $visible_items = {
+ map { $_->itemnumber => $_ }
+ $biblio->items
+ ->filter_by_visible_in_opac
+ ( { patron =>
+ $patron
+ }
+ )->as_list
+ };
+
+==> b1185.par <==
+--indent-columns=10
+--line-up-parentheses
+--maximum-line-length=44
+--vertical-tightness=2
+--weld-nested-containers
+
==> b120.in <==
# Same as bug96
# State 1
# breaks.
$self->[_ris_essential_old_breakpoint_]->{$Kprev} = 1;
+ # Avoid measuring from between an opening paren and a previous token
+ # which should stay close to it ... fixes b1185
+ my $token_oo = $rLL->[$Kouter_opening]->[_TOKEN_];
+ my $type_prev = $rLL->[$Kprev]->[_TYPE_];
+ if ( $Kouter_opening == $Kfirst
+ && $token_oo eq '('
+ && $has_tight_paren{$type_prev} )
+ {
+ $Kref = $Kprev;
+ }
+
# Back up and count length from a token like '=' or '=>' if -lp
# is used (this fixes b520)
# ...or if a break is wanted before there
- my $type_prev = $rLL->[$Kprev]->[_TYPE_];
- if ( $rOpts_line_up_parentheses
+ elsif ($rOpts_line_up_parentheses
|| $want_break_before{$type_prev} )
{
sub in_same_container_i {
- # check to see if tokens at i1 and i2 are in the same container, and not
- # separated by certain characters: => , ? : || or This is an interface
- # between the _to_go arrays to the rLL array
+ # Check to see if tokens at i1 and i2 are in the same container, and
+ # not separated by certain characters: => , ? : || or
+ # This is an interface between the _to_go arrays to the rLL array
my ( $self, $i1, $i2 ) = @_;
# quick check
=over 4
+=item B<Fix edge case of formatting instability, b1185>.
+
+Testing with random parameters produced a case of welding instability involving
+parameters -wn, -vt=2, -lp and a short maximum line length.
+
+This fixes case b1185.
+
+1 Aug 2021.
+
=item B<Fix edge case of formatting instability, b1183>.
Testing with random parameters produced a case of welding instability involving