Skip to content

Commit 49eeb3a

Browse files
committed
Explicit alphanumeric sorting of files and categories
1 parent 7911bc8 commit 49eeb3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Pod/Htmlify.pm6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ class Website is export {
9898
method write-category-indices {
9999
say "Creating category index files";
100100
my @headers = qw{File Title Author};
101-
for $!categories.categories-table.sort(*.key)>>.kv -> ($category-key, $title) {
101+
for $!categories.categories-table.sort({ $^a.key cmp $^b.key })>>.kv -> ($category-key, $title) {
102102
my $category = $!categories.category-with-key($category-key);
103-
my @examples = $category.examples.values.sort(:by<filename>);
103+
my @examples = $category.examples.values.sort({ $^a.filename cmp $^b.filename });
104104
my @rows = @examples.map: {[.pod-link, .title, .author]};
105105
my $category-index-pod;
106106

0 commit comments

Comments
 (0)