From fb98f6350728805926958f3a1fde4fbee4032063 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 23 Oct 2024 14:46:55 -0700 Subject: [PATCH] mark containers with here-docs as broken --- lib/Perl/Tidy/Formatter.pm | 7 +++++++ 1 file changed, 7 insertions(+) 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 ); + } } } } -- 2.39.5