Commit messages are assumed to be displayed in a terminal
with a fixed width font, so we must preserve newlines and
all whitespace as-is so ASCII art may be displayed properly.
qq(<link\nrel="alternate"\ntype="text/html"\nhref="$url"\n/>);
my ($plinks, $id, $ai);
my $end = '';
+ my $blines;
sub {
my $dst;
# $_[0] == scalar buffer, undef means EOF from "git log"
if (++$state == STATE_BODY) {
flush_hdr(\$dst, $hdr, $url);
$hdr = {};
+ $blines = 0;
}
next;
}
$dst .= qq(</pre></div></content></entry>);
$state = 0;
} else {
+ $dst .= "\n" if $blines++;
$dst .= utf8_html($l);
}
}
is($p->format, "Atom", "parsed atom feed");
is(scalar $p->entries, 6, "parsed six entries");
}
+ like($body, qr!<pre\s*[^>]+>\* header:\n add header</pre>!,
+ 'body wrapped in <pre>');
$res = $cb->(GET($req . '/'));
my $sl = dechunk($res);