From: Steve Hancock Date: Sun, 13 Jun 2021 13:57:06 +0000 (-0700) Subject: Allow stacked labels without spaces X-Git-Tag: 20210402.01~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c2a63b2e8c64fc3006f6718cd08cea39dad28ebe;p=perltidy.git Allow stacked labels without spaces --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index fb63dac4..075c2d54 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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; diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index d04776c8..5cd28048 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -2,6 +2,23 @@ =over 4 +=item B + +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 Random testing produced some cases of instability involving -wn -lp and some