## 2021 07 17.04
- - Added two new parameters to control the block types to which the
+ - Two new parameters were added to control the block types to which the
-bl (--opening-brace-on-new-line) flag applies. The new parameters are
-block-left-list=s, or -bll=s, and --block-left-exclusion-list=s,
or -blxl=s. Previously the -bl flag was 'hardwired' to apply to
the controls. If you want to recover the exact previous default behavior of
the -bli then add the -bl flag.
- - Partial fix issue for git #74, the -lp formatting style was
+ - A partial fix was made for issue for git #74. The -lp formatting style was
being lost when a one-line anonymous sub was followed by a closing brace.
- - Fix issue git #73, the -nfpva flag was not working correctly.
+ - Fixed issue git #73, in which the -nfpva flag was not working correctly.
Some unwanted vertical alignments of spaced function perens
were being made.
comment, '#>>V', can be lost. A workaround for the previous version
is to include the parameter '-mbl=2'.
- - Vertical alignment of function calls without parens has been improved
- and is now closer to alignment results with parens. For example
+ - Vertical alignment of function calls without parens has been improved and
+ in many cases is closer to what alignment would be if parens had been used.
# OLD
mkTextConfig $c, $x, $y, -anchor => 'se', $color;
- This version runs 10 to 15 percent faster on large files than the
previous release due to optimizations made with the help of NYTProf.
- - This version was subjected to over 200 cpu hours of testing with random input
- parameters with no instabilities (metastable states) or other irregularities
- seen.
-
- Numerous minor fixes have been made, mostly very rare formatting instabilities
- found in random testing. A complete list is at:
+ found in random testing. An effort has been made to minimize changes to
+ existing formatting, but some changes will invariably occur. Many of these
+ updates are listed at:
https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
--vertical-tightness=2
--weld-nested-containers
+==> b1231.in <==
+# S1
+@data =
+ (
+ [
+ "1st", "2nd", "3rd", "4th",
+ "5th", "6th", "7th", "8th",
+ "9th"
+ ],
+ [
+ 1, 2, 5, 6, 3, 1.5, 1, 3, 4
+ ],
+ );
+# S2
+@data =
+ (
+ [
+ "1st", "2nd", "3rd", "4th", "5th", "6th",
+ "7th", "8th", "9th"
+ ],
+ [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4 ],
+ );
+
+==> b1231.par <==
+--break-before-paren-and-indent=2
+--break-before-paren=3
+--continuation-indentation=9
+--extended-continuation-indentation
+--ignore-old-breakpoints
+--indent-columns=1
+--maximum-line-length=47
+
==> b131.in <==
unless
( open( SCORE, "+>>$Score_File" ) )
my $length_tol =
max( 1, $rOpts_continuation_indentation, $rOpts_indent_columns );
if ($rOpts_ignore_old_breakpoints) {
- $length_tol += $rOpts_maximum_line_length;
+
+ # Patch suggested by b1231; the old tol was excessive.
+ ## $length_tol += $rOpts_maximum_line_length;
+ $length_tol *= 2;
}
my $rbreak_before_container_by_seqno = {};
my $ci = $rLL->[$KK]->[_CI_LEVEL_];
+ # Fix for b1231: the has_list_with_lec does not cover all cases.
+ # A broken container containing a list and with line-ending commas
+ # will stay broken, so can be treated as if it had a list with lec.
+ $has_list_with_lec ||=
+ $has_list
+ && $ris_broken_container->{$seqno}
+ && $rlec_count_by_seqno->{$seqno};
+
DEBUG_BBX
&& print STDOUT
"BBX: Looking at seqno=$seqno, token = $token with option=$break_option\n";