From ce00a50fd8e158e2cab93f744042bdbf3939d1b6 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 30 Mar 2026 12:24:13 -0500 Subject: [PATCH] Adjust the sort order of the new-notes files Preparing to sort PR-999.md and PR-1000.md correctly --- documentation/make-notes.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/documentation/make-notes.pl b/documentation/make-notes.pl index 37c1271e4..537bb54e4 100644 --- a/documentation/make-notes.pl +++ b/documentation/make-notes.pl @@ -58,7 +58,15 @@ if ($opt_d) { opendir my $dh, $opt_d or die "$tool: Can't open '-d' directory: $!\n"; - foreach my $fn (sort grep !m/^ \. \.? $/x, readdir $dh) { + # Get filenames, exclude dot-files, sort + my @files = sort { + my $rx = qr/^ (\D+) (\d+) (.*) $/x; + my @a = ($a =~ m/$rx/); + my @b = ($b =~ m/$rx/); + $a[0] cmp $b[0] || $a[1] <=> $b[1] || $a[2] cmp $b[2]; + } grep !m/^ \. \.? $/x, readdir $dh; + + foreach my $fn (@files) { next if $fn eq 'README.txt'; die "$tool: Not markdown? File '$fn' lacks '.md' extension\n" unless $fn =~ m/\.md$/;