]> git.donarmstrong.com Git - perltidy.git/commitdiff
do not add a , after a =>
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 27 Sep 2024 01:39:39 +0000 (18:39 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 27 Sep 2024 01:39:39 +0000 (18:39 -0700)
lib/Perl/Tidy/Formatter.pm

index 5373c74de74d745378a1e0d440df66dcf3ab3341..724ec313ed56c0bc861920498fbe4771f77eeb5c 100644 (file)
@@ -12570,6 +12570,10 @@ sub respace_tokens_inner_loop {
                                             $last_nonblank_code_type}
                                     )
                                 )
+
+                                # and not preceded by '=>'
+                                # (unusual but can occur in test files)
+                                && $last_nonblank_code_type ne '=>'
                               )
                             {
                                 my $rule = $trailing_comma_rules{add};