From: Sergey Matveev Date: Fri, 18 Feb 2022 13:44:22 +0000 (+0300) Subject: There are empty authors in lame feeds X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=481de0babe5fa01a672ef1d413db62c1236b7274;p=feeder.git There are empty authors in lame feeds --- diff --git a/cmd/feed2mdir/main.go b/cmd/feed2mdir/main.go index 9fd657c..5e538ba 100644 --- a/cmd/feed2mdir/main.go +++ b/cmd/feed2mdir/main.go @@ -115,7 +115,9 @@ func main() { fd.WriteString("Content-Type: text/html; charset=utf-8\n") fd.WriteString("Content-Transfer-Encoding: base64\n") for _, author := range item.Authors { - fd.WriteString("X-Author: " + author.Name + "\n") + if len(author.Name) > 0 { + fd.WriteString("X-Author: " + author.Name + "\n") + } } for _, link := range item.Links { fd.WriteString("X-URL: " + link + "\n")