-sub _parent_headers {
- my ($hdr, $over) = @_;
- my $rv = '';
- my @irt = $hdr->header_raw('In-Reply-To');
- my $refs;
- if (@irt) {
- my $lnk = PublicInbox::Linkify->new;
- $rv .= "In-Reply-To: $_\n" for @irt;
- $lnk->linkify_mids('..', \$rv);
- } else {
- $refs = references($hdr);
- my $irt = pop @$refs;
- if (defined $irt) {
- my $html = ascii_html($irt);
- my $href = mid_href($irt);
- $rv .= "In-Reply-To: <";
- $rv .= "<a\nhref=\"../$href/\">$html</a>>\n";
- }
- }
-
- # do not display References: if search is present,
- # we show the thread skeleton at the bottom, instead.
- return $rv if $over;
-
- $refs //= references($hdr);
- if (@$refs) {
- @$refs = map { linkify_ref_no_over($_) } @$refs;
- $rv .= 'References: '. join("\n\t", @$refs) . "\n";
- }
- $rv;
-}
-
-# returns a string buffer