From c2a63b2e8c64fc3006f6718cd08cea39dad28ebe Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 13 Jun 2021 06:57:06 -0700 Subject: [PATCH] Allow stacked labels without spaces --- lib/Perl/Tidy/Formatter.pm | 5 +++-- local-docs/BugLog.pod | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) 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 -- 2.39.5