From 6d5bb740764dfc2df5056bc0e455babd280faa37 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 11 Feb 2021 06:50:42 -0800 Subject: [PATCH] Do not break one-line block at here target --- lib/Perl/Tidy/Formatter.pm | 2 +- local-docs/BugLog.pod | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 292f9603..50ba34b2 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -9906,7 +9906,7 @@ EOM # no newlines after seeing here-target $no_internal_newlines = 2; - destroy_one_line_block(); + ## destroy_one_line_block(); # deleted to fix case b529 $self->store_token_to_go( $Ktoken_vars, $rtoken_vars ); } diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index abeeebc5..619c049f 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -2,6 +2,24 @@ =over 4 +=item B + +A blinking state produced by random testing was traced to a line of coding +which which unnecessarily prevented one-line blocks from being formed when a +here-target was encountered. This has been fixed. + +For example, the code block in the following contains a here target and was being +broken into two lines: + + unless ($INC{$file}) { + die <<"END_DIE" } + +These will now be output with the blocks intact, like this + + unless ($INC{$file}) { die <<"END_DIE" } + +This fixes case b523. 11 Feb 2021. + =item B Random testing produced an alternating state which was caused by -kgb flags @@ -10,7 +28,7 @@ was added to prevent this. Also, the -kgb* flags have no effect if no blank lines can be output, so a check was added for this situation. This fixes case b760. -10 Feb 2021. +10 Feb 2021, 177fc3a. =item B -- 2.39.5