From: Steve Hancock Date: Wed, 1 Jul 2020 12:35:14 +0000 (-0700) Subject: minor fix - include hanging side comments in alignment tree construction X-Git-Tag: 20200619.02~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=befa641153e42bd65c6fbc90f995363f7c41533a;p=perltidy.git minor fix - include hanging side comments in alignment tree construction --- 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 ) {