From: Steve Hancock Date: Wed, 23 Oct 2024 21:46:55 +0000 (-0700) Subject: mark containers with here-docs as broken X-Git-Tag: 20240903.05~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fb98f6350728805926958f3a1fde4fbee4032063;p=perltidy.git mark containers with here-docs as broken --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index aa4e2c1a..e8c27d3f 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -13987,6 +13987,13 @@ sub store_token { if ( $type eq 'h' && !$K_first_here_doc_by_seqno{$seqno} ) { my $KK_new = @{$rLL_new}; $K_first_here_doc_by_seqno{$seqno} = $KK_new; + + # the here doc which follows makes the container broken + if ( !$ris_permanently_broken->{$seqno} ) { + $ris_permanently_broken->{$seqno} = 1; + $self->mark_parent_containers( $seqno, + $ris_permanently_broken ); + } } } }