Skip to content

Commit

Permalink
Merge pull request #48 from jpmonette/issue-41
Browse files Browse the repository at this point in the history
Resolves #41 - Fix “author” tag based on W3 Validator
  • Loading branch information
jpmonette authored Mar 31, 2017
2 parents f34493c + c0f951b commit 8fad2f5
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions lib/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,9 @@ function atom_1_0(options) {
// entry author(s)
if(entries[i].author) {
for(var y = 0; y < entries[i].author.length; y++) {
var entryAuthor = [];

if(entries[i].author[y].name)
entryAuthor.push({ name: entries[i].author[y].name });

if(entries[i].author[y].email)
entryAuthor.push({ email: entries[i].author[y].email });

if(entries[i].author[y].link)
entryAuthor.push({ uri: entries[i].author[y].link });

entry.push({ author: entryAuthor });
if(entries[i].author[y].email) {
entry.push({ author: entries[i].author[y].email });
}
}
}

Expand Down

0 comments on commit 8fad2f5

Please sign in to comment.