From befa641153e42bd65c6fbc90f995363f7c41533a Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 1 Jul 2020 05:35:14 -0700 Subject: [PATCH] minor fix - include hanging side comments in alignment tree construction --- lib/Perl/Tidy/VerticalAligner.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index c1222c47..388a2b34 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -3246,6 +3246,11 @@ sub prune_alignment_tree { $end_node->( 0, $jm, $n_parent ); } + # Continue at hanging side comment + elsif ( $rlines->[$jp]->{_is_hanging_side_comment} ) { + next; + } + # Otherwise see if anything changed and update the tree if so else { foreach my $depth ( 0 .. $MAX_DEPTH ) { -- 2.39.5