]> git.donarmstrong.com Git - perltidy.git/commitdiff
Allow stacked labels without spaces
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 13 Jun 2021 13:57:06 +0000 (06:57 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 13 Jun 2021 13:57:06 +0000 (06:57 -0700)
lib/Perl/Tidy/Formatter.pm
local-docs/BugLog.pod

index fb63dac48c09be4f6298d69874d4168994016c90..075c2d540eec4c218ee831a07eb1b2edd75df603 100644 (file)
@@ -2897,8 +2897,9 @@ EOM
           # Not really required:
           ## || ( ( $typel eq '?' ) && ( $typer eq 'Q' ) )
 
-          # space stacked labels  (TODO: check if really necessary)
-          || $typel eq 'J' && $typer eq 'J'
+          # Space stacked labels...
+          # Not really required: Perl seems to accept non-spaced labels.
+          ## || $typel eq 'J' && $typer eq 'J'
 
           ;    # the value of this long logic sequence is the result we want
         return $result;
index d04776c8a6dc68cf24e2344ea2a0dd908ef0d518..5cd28048da2b6a25470aab114e5e67c73145ce62 100644 (file)
@@ -2,6 +2,23 @@
 
 =over 4
 
+=item B<Allow stacked labels without spaces>
+
+When labels are stacked in a single line, such as
+
+A:B:C:
+
+the default is to space them:
+
+A: B: C:
+
+This update allows them to be removed if desired:
+
+# perltidy -naws -dws
+A:B:C:
+
+13 Jun 2021
+
 =item B<Fix edge cases of instability involving -wn -lp>
 
 Random testing produced some cases of instability involving -wn -lp and some