From: Steve Hancock Date: Thu, 11 Feb 2021 14:50:42 +0000 (-0800) Subject: Do not break one-line block at here target X-Git-Tag: 20210402~54 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6d5bb740764dfc2df5056bc0e455babd280faa37;p=perltidy.git Do not break one-line block at here target --- 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