From ac8befbf02d079804397e2291cdb94c553818f25 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 13 Oct 2022 05:21:31 -0700 Subject: [PATCH] update docs --- bin/perltidy | 4 +++- lib/Perl/Tidy/Formatter.pm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/perltidy b/bin/perltidy index 08835e31..7040e10f 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -3505,8 +3505,10 @@ Here are some example parameter combinations and their meanings -wtc=0 -dtc : delete all trailing commas -wtc=1 -atc : put trailing commas on all lists - -wtc=m -atc : all multi-line lists get trailing commas; + -wtc=m -atc : all multi-line lists get trailing commas, and single line lists remain unchanged. + -wtc=m -dtc : multi-line lists remain unchanged, and + any trailing commas on single line lists are removed. -wtc=m -atc -dtc : all multi-line lists get trailing commas, and any trailing commas on single line lists are removed. diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 38f3aea9..bb4f4f67 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -15623,7 +15623,7 @@ EOM } ## end for ( my $i = 0 ; $i <=...) # Break at a single interior C-style for semicolon in this batch (c154) - if ( @i_for_semicolon == 1 ) { + if ( @i_for_semicolon && @i_for_semicolon == 1 ) { my $i = $i_for_semicolon[0]; my $inext = $inext_to_go[$i]; if ( $inext <= $max_index_to_go && $types_to_go[$inext] ne '#' ) { -- 2.39.5