From: Steve Hancock Date: Wed, 26 Apr 2023 12:45:38 +0000 (-0700) Subject: Insure correct marking of a brace following a format stmt X-Git-Tag: 20230309.03~31 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=61f83f2d9965ebbbf88fac4e44df9a520e5d18c1;p=perltidy.git Insure correct marking of a brace following a format stmt This does not change formatting but insures that braces are correctly marked. This fixes issue c202/t032. --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 2e91624d..8f54001e 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -1035,6 +1035,11 @@ sub get_line { if ( !$self->[_in_format_] ) { $self->log_numbered_msg("Exiting format section\n"); $line_of_tokens->{_line_type} = 'FORMAT_END'; + + # Make the tokenizer mark an opening brace which follows + # as a code block. Fixes issue c202/t032. + $last_nonblank_token = ';'; + $last_nonblank_type = ';'; } } else {