From 05a7a1882480bf9fb63bf5dd9c157fd95b1b153f Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 1 Sep 2020 06:57:09 -0700 Subject: [PATCH] minor cleanups for -nib option --- bin/perltidy | 4 ++-- lib/Perl/Tidy/Formatter.pm | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/perltidy b/bin/perltidy index 33383d8b..5303d5bd 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -883,8 +883,8 @@ For example, to match the side comment '#++', the parameter would be -nibp='#\+\+' Note that the default string is the same as the string for starting a -B section, but it is for a side-comment rather than a block -comment. +B section, but in that case it is for a block comment +rather than a side-comment. =item B<-olq>, B<--outdent-long-quotes> diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 01dd4616..4c4ce853 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -4631,8 +4631,7 @@ sub non_indenting_braces { $num -= 1; } } - if ($num) { $level -= $num } - $radjusted_levels->[$KK] = $level; + $radjusted_levels->[$KK] = $level - $num; } $self->[_radjusted_levels_] = $radjusted_levels; return; @@ -7359,8 +7358,6 @@ sub copy_token_as_type { @inext_to_go = (); @iprev_to_go = (); - ##$summed_lengths_to_go[0] = 0; - $rbrace_follower = undef; $comma_count_in_batch = 0; $ending_in_quote = 0; -- 2.39.5