#!/usr/bin/perl -w
print <<'EOF' ;
A Message from the Git Maintainer
EOF
sub show_links {
local ($_) = @_;
my $br = '';
for (split(/\n/, $_)) {
s/^\s*//;
s/\s*\Z//;
my $url = $_;
my $comment = $_;
$url =~ s/ .*//;
if ($url =~ /^http:/) {
print "$br$comment";
} else {
print "$br$comment";
}
$br = "
\n";
}
print "\n";
}
sub show_commands {
local ($_) = @_;
my $br = '';
for (split(/\n/, $_)) {
s/^\s*//;
s/\s*\Z//;
print "$br$_";
$br = "
\n";
}
print "\n";
}
my $in_ul;
$/ = "";
while (<>) {
$_ =~ s/\n+$//s;
if (/^ - /) {
if (!$in_ul) {
$in_ul = 1;
print "\n";
}
s/^ - //;
print "- $_
\n";
next;
}
if ($in_ul) {
$in_ul = undef;
print "
\n\n";
}
if (s/^\*\s*//) {
print "$_
\n\n";
} elsif (s/^ {4,}//) {
print "\n";
if (/^(http|git|nntp):\/\//) {
show_links($_);
} else {
show_commands($_);
}
print "
\n\n";
} else {
print "$_
\n\n";
}
}
print <<'EOF' ;
EOF