]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix b1441
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 15 Dec 2022 19:32:06 +0000 (11:32 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 15 Dec 2022 19:32:06 +0000 (11:32 -0800)
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm

index 2a69cf09c028cc4aca83de9356c35185d395765d..408912654d35034c3e29b21547a5e53074acf3a2 100644 (file)
@@ -11220,6 +11220,26 @@ $last = after (
 --opening-paren-right
 --variable-maximum-line-length
 
+==> b1441.in <==
+    my $my_handler =
+       new XML::Handler::YAWriter (
+                                  'Output' => $fileHandler,
+
+       );
+
+    my $my_handler =
+       new XML::Handler::YAWriter ( 'Output' => $fileHandler,
+
+       );
+
+
+==> b1441.par <==
+--continuation-indentation=3
+--extended-line-up-parentheses
+--maximum-line-length=61
+--paren-vertical-tightness=1
+--space-function-paren
+
 ==> b146.in <==
 # State 1
 
index 8df1c1efed8d2fe7a13ddb5780f0df30f707544e..9d523fa804020a0332d21275ac5bbbbbcab5ce49 100644 (file)
@@ -12804,9 +12804,16 @@ sub xlp_collapsed_lengths {
                         }
                     }
 
+                    #--------------------------------------------------
+                    # This block is deactivated to fix b1441. It is not
+                    # needed now because the comma length is added later,
+                    # and including it twice can cause instability.
+                    # This block can eventually be removed.
+                    #--------------------------------------------------
                     # Include length to a comma ending this line
                     # note: any side comments are handled at loop end (b1332)
-                    if (   $interrupted_list_rule
+                    if (   0
+                        && $interrupted_list_rule
                         && $rLL->[$K_terminal]->[_TYPE_] eq ',' )
                     {
                         my $Kend = $K_terminal;