From d4395672676f79ff402a904f941567d466c1f837 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 15 Nov 2022 05:21:24 -0800 Subject: [PATCH] add comment --- lib/Perl/Tidy/Formatter.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index f09a4725..1aa738ba 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -2510,6 +2510,8 @@ sub initialize_trailing_comma_rules { $option =~ s/^\s+//; $option =~ s/\s+$//; } + + # We need to use length() here because '0' is a possible option if ( defined($option) && length($option) ) { my $error_message; my %rule_hash; @@ -2605,7 +2607,7 @@ EOM } return; -} +} ## end sub initialize_trailing_comma_rules sub initialize_whitespace_hashes { -- 2.39.5