From: Steve Hancock Date: Fri, 9 Feb 2024 00:20:36 +0000 (-0800) Subject: use numerical sort X-Git-Tag: 20240202.01~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f237260c4be750f5cdfaa57713449c390453d889;p=perltidy.git use numerical sort This should be a numerical sort, although it will not normally matter. --- diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 0956ec0f..fa4dcac4 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -3684,7 +3684,7 @@ sub get_line_token_info { # handle no levels my $rtoken_patterns = {}; my $rtoken_indexes = {}; - my @levs = sort keys %saw_level; + my @levs = sort { $a <=> $b } keys %saw_level; if ( !defined($lev_min) ) { $lev_min = -1; $lev_max = -1;