From 6dbf0348eb1438ea3b783a097d1a7346acb002c7 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 5 Nov 2020 08:30:17 -0800 Subject: [PATCH] minor optimization --- lib/Perl/Tidy/VerticalAligner.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 1e7e8bf8..d960c9fc 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -429,7 +429,7 @@ sub valign_input { $is_outdented = 0 if $is_hanging_side_comment; # Identify a block comment. - my $is_block_comment = ( $jmax == 0 && $rfields->[0] =~ /^#/ ); + my $is_block_comment = $jmax == 0 && substr( $rfields->[0], 0, 1 ) eq '#'; # Block comment .. update count if ($is_block_comment) { -- 2.39.5