{ head("Lintian Reports by Maintainer") }
  <h1>Maintainers</h1>

  <p>
    Maintainers are listed sorted case-insensitively by package maintainer
    string.  This is an unsophisticated sort that does not take into
    account any national collating sequence, only Unicode strings, so
    maintainers whose names start with non-ASCII characters will sort at
    the end of this page.
  </p>

  <p>
    Jump to: { join (' ', map { qq(<a href="#$_">$_</a>) } 'A'..'Z') }
{
    # !!NB!! We are deliberately leaving out the closing "</p>" here.
    # It will be added by the loop below, which can (due to this)
    # unconditionally emit a "</p>" at the start of each new letter.

    # Put headings before each new initial letter and add anchors, except
    # for non-ASCII initial characters.  For those, since we can't be
    # 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 $maint_data = $maintainers{$key};
        my $url = $maint_data->{url};
        my $maintainer = $maint_data->{name};
        my $first = uc substr($key, 0, 1);
        if ($first lt 'A' || $first gt 'Z') {
            $first = 'Other';
        }
        if ($first ne $letter) {
            $letter = $first;
            if ($letter eq 'Other') {
                $OUT .= qq(  </p>\n\n  <h2>Other</h2>\n\n  <p>\n);
            } else {
                $OUT .= qq(  </p>\n\n  <h2 id="$letter"><a id="$letter">)
                    . $letter . "</a></h2>\n\n  <p>\n";
            }
        }
        $OUT .= qq(    <a href="${path_prefix}maintainer/$url">$maintainer</a>)
            . qq{ (<a href="${path_prefix}full/$url">full report</a>)<br />\n};
    }
}  </p>
{ foot() }
