danmactough / node-feedparser

Robust RSS, Atom, and RDF feed parsing in Node.js
Other
1.97k stars 190 forks source link

Converge code for array processing #222

Open rdbcci opened 7 years ago

rdbcci commented 7 years ago

This change removes the duplicate code that is propagating at certain tags (meta.link, meta.category, item.link, item.enclosure, item.media:content, item.category) because the processing object may be an array. This change forces those objects that are not arrays to be arrays and the non-array processing is removed.

This change also addresses issue #219 by changing code to always use "link['@']['href']" when it exists and a link has not been chosen by the code.

rdbcci commented 7 years ago

Removed mixed tabs and spaces.