From: Steve Hancock Date: Thu, 13 Oct 2022 12:21:31 +0000 (-0700) Subject: update docs X-Git-Tag: 20220613.06~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ac8befbf02d079804397e2291cdb94c553818f25;p=perltidy.git update docs --- 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 '#' ) {