]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix unusual formatting issue b1319
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 19 Mar 2022 14:56:59 +0000 (07:56 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 19 Mar 2022 14:56:59 +0000 (07:56 -0700)
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm

index 57ef1797bb711bc67648dbcdbe9a152b2b865b82..6dfdeffa2592ff7fe43fd878326c60847d987929 100644 (file)
@@ -9433,6 +9433,31 @@ my %config = (
 --maximum-line-length=19
 --variable-maximum-line-length
 
+==> b1319.in <==
+# S1
+my @tests = (
+    {
+      expects => [
+                  sort qw/ Class::Moose::RoleList1 Class::Moose::RoleList2 /
+      ],
+    },
+);
+
+# S2
+my @tests = (
+          {
+            expects => [
+                         sort
+                                qw/ Class::Moose::RoleList1 Class::Moose::RoleList2 /
+            ],
+          },
+);
+
+==> b1319.par <==
+--continuation-indentation=7
+--extended-line-up-parentheses
+--keep-old-breakpoints-after='q'
+
 ==> b1321.in <==
 my $parser =
   Pod::Markdown->new(
index fa436d6d33cbcd1d83031d6aca0d80acf1edee81..7c9de6310d5f7db71be4da23d26f6161f2cfa486 100644 (file)
@@ -10873,6 +10873,11 @@ sub collapsed_lengths {
                         $level_start_multiline_qw =
                           $rLL->[$K_start_multiline_qw]->[_LEVEL_];
                     }
+                    else {
+
+                        # Fix for b1319, b1320
+                        goto NOT_MULTILINE_QW;
+                    }
                 }
             }
 
@@ -10904,6 +10909,8 @@ sub collapsed_lengths {
             next if ( $K_begin_loop > $K_last );
 
         }
+
+      NOT_MULTILINE_QW:
         $K_start_multiline_qw = undef;
 
         # Find the terminal token, before any side comment