]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix b1440
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Dec 2022 16:53:39 +0000 (08:53 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Dec 2022 16:53:39 +0000 (08:53 -0800)
dev-bin/perltidy_random_setup.pl
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm

index 5f2c6103a9ae78854a139114dd7abdcae5c2bec7..eda1dedaf6135fd8aa86249f2c4cbe1b0415ef01 100755 (executable)
@@ -1225,6 +1225,9 @@ EOM
           backup-file-extension
           backup-method
           character-encoding
+          dump-block-summary
+          dump-block-types
+          dump-block-minimum-lines
           dump-cuddled-block-list
           dump-defaults
           dump-long-names
index 662496d7da1f1cc407ab8b1e86d49e7fea8b295f..2a69cf09c028cc4aca83de9356c35185d395765d 100644 (file)
@@ -11199,6 +11199,27 @@ $last = after (
 --keep-old-breakpoints-after='-'
 --want-break-before='-'
 
+==> b1440.in <==
+        $comp = ( $form->[3] ? (
+                $im3->dummy( 0, 3 ) > 0 ) *
+                  255 :
+                  ( $im3 > 0 ) );
+
+        $comp =
+              ( $form->[3] ?
+                  (
+                $im3->dummy( 0, 3 ) > 0 ) *
+                  255 :
+                  ( $im3 > 0 ) );
+
+==> b1440.par <==
+--break-after-all-operators
+--continuation-indentation=6
+--keep-old-breakpoints-after='?'
+--maximum-line-length=29
+--opening-paren-right
+--variable-maximum-line-length
+
 ==> b146.in <==
 # State 1
 
index d3b1d49430983c7ca8989291f3862c731baae159..e05f681c27d429cc330e103a555f2256def847f5 100644 (file)
@@ -2436,11 +2436,12 @@ EOM
 
     # Ignore kbb='(' and '[' and '{': can cause unstable math formatting
     # (issues b1346, b1347, b1348) and likewise ignore kba=')' and ']' and '}'
+    # Also always ignore ? and : (b1440 and b1433-b1439)
     if ( $short_name eq 'kbb' ) {
-        @list = grep { !m/[\(\[\{]/ } @list;
+        @list = grep { !m/[\(\[\{\?\:]/ } @list;
     }
     elsif ( $short_name eq 'kba' ) {
-        @list = grep { !m/[\)\]\}]/ } @list;
+        @list = grep { !m/[\)\]\}\?\:]/ } @list;
     }
 
     # pull out any any leading container code, like f( or *{