diff --git a/orrg.pl b/orrg.pl
index 98f881144d82da535611babc888eae9ed458c221..1be767a230394ae95b8eb91d07b61b192d2feb67 100755
--- a/orrg.pl
+++ b/orrg.pl
@@ -74,20 +74,22 @@ push @body, ('## recent feed items', '');
my $hs = HTML::Strip->new(emit_spaces => 0, auto_reset => 1);
foreach my $it ($feed->get_item()) {
- push @body, '### '. $it->title;
+ push @body, $it->description ne '' ? '### '. $it->title : $it->title;
if ($it->pubDate ne '') {
my $dt = DateTime::Format::ISO8601->parse_datetime($it->pubDate);
push @body, 'published '. strftime('%Y-%m-%dT%H:%M:%SZ', gmtime($dt->epoch));
}
- push @body, '';
if ($it->description ne '') {
+ push @body, '';
my $desc = $it->description;
+ chomp $desc;
$desc =~ s/\<li\>/* /ig;
+ $desc =~ s/\<br \/\>/\r\n/ig;
push @body, $hs->parse($desc);
}
$it->link eq '' or push @body, ('=> '.$it->link.' open entry in browser', '');
}
-
+
return @body;
}