mirror of
https://github.com/LightAir/turbo-rss.git
synced 2026-02-04 03:56:19 +00:00
updates tests and documentation with category support
This commit is contained in:
@@ -70,9 +70,9 @@ function generateXML (data){
|
||||
ifTruePush(item.url, item_values, { link: item.url });
|
||||
ifTruePush(item.link || item.guid || item.title, item_values, { guid: [ { _attr: { isPermaLink: !item.guid && !!item.url } }, item.guid || item.url || item.title ] });
|
||||
|
||||
for (var i in item.categories) {
|
||||
ifTruePush(item.categories[i], item_values, { category: { _cdata: item.categories[i] } });
|
||||
}
|
||||
item.categories.forEach(function(category) {
|
||||
ifTruePush(category, item_values, { category: { _cdata: category } });
|
||||
});
|
||||
|
||||
ifTruePush(item.author || data.author, item_values, { 'dc:creator': { _cdata: item.author || data.author } });
|
||||
ifTruePush(item.date, item_values, { pubDate: new Date(item.date).toGMTString() });
|
||||
|
||||
Reference in New Issue
Block a user