From: Steve Hancock Date: Tue, 28 Feb 2023 16:05:21 +0000 (-0800) Subject: fix incorrect log message, issue c195 X-Git-Tag: 20230309~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a5e4b21a12cd2a72a4f08d261e36bbf6c865819d;p=perltidy.git fix incorrect log message, issue c195 --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 94e7bf92..f828753a 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -16278,6 +16278,10 @@ sub compare_indentation_levels { my $rLL = $self->[_rLL_]; + # ignore a line with a leading blank token - issue c195 + my $type = $rLL->[$K_first]->[_TYPE_]; + return if ( $type eq 'b' ); + my $structural_indentation_level = $self->[_radjusted_levels_]->[$K_first]; # record max structural depth for log file @@ -16290,7 +16294,7 @@ sub compare_indentation_levels { my $is_closing_block = $type_sequence && $self->[_rblock_type_of_seqno_]->{$type_sequence} - && $rLL->[$K_first]->[_TYPE_] eq '}'; + && $type eq '}'; if ( $guessed_indentation_level ne $structural_indentation_level ) { $self->[_last_tabbing_disagreement_] = $line_number;