[lintian] 04/09: maintains.tmpl: Fix sorting and add jump link to "other"
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 70a24ede2fcfbd4b2d51412fae149ba274d014a3
Author: Niels Thykier <niels@thykier.net>
Date: Wed Jul 6 15:32:25 2016 +0000
maintains.tmpl: Fix sorting and add jump link to "other"
Signed-off-by: Niels Thykier <niels@thykier.net>
---
reporting/templates/maintainers.tmpl | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/reporting/templates/maintainers.tmpl b/reporting/templates/maintainers.tmpl
index b6c02e8..dafda77 100644
--- a/reporting/templates/maintainers.tmpl
+++ b/reporting/templates/maintainers.tmpl
@@ -10,7 +10,7 @@
</p>
<p>
- Jump to: { join (' ', map { qq(<a href="#$_">$_</a>) } 'A'..'Z') }
+ Jump to: { join (' ', (map { qq(<a href="#$_">$_</a>) } 'A'..'Z', 'Other')) }
{
# !!NB!! We are deliberately leaving out the closing "</p>" here.
# It will be added by the loop below, which can (due to this)
@@ -21,7 +21,19 @@
# assured we'll get combining characters right, just accumulate them
# under a heading of Other.
my $letter = '';
- for my $key (sort { lc ($a) cmp lc ($b) } keys %maintainers) {
+ my @order = sort {
+ my $la = lc($a);
+ my $lb = lc($b);
+ # Ensure non-ASCII characters get push to the back
+ if ($la lt 'a' and $lb ge 'a') {
+ 1;
+ } elsif ($la ge 'a' and $lb lt 'a') {
+ -1;
+ } else {
+ $la cmp $lb;
+ }
+ } keys(%maintainers);
+ for my $key (@order) {
my $maint_data = $maintainers{$key};
my $url = $maint_data->{url};
my $maintainer = $maint_data->{name};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: