xqwzts / feedparser

A Dart library for parsing RSS feeds
MIT License
17 stars 16 forks source link

Add optional 'comments' feed item #2

Closed axispx closed 6 years ago

xqwzts commented 6 years ago

@anarchyrucks Thanks for contributing!

I took a look at the RSS 2.0 spec and it seems comments is only expected to be included under individual items [feed_item.dart] and not per-feed [feed.dart]. You've implemented it under both in this PR, is that a scenario that you came across?

If you aren't coming across Feed-level comments then I'd prefer to remove that, and only add the FeedItem comments field.

Otherwise this looks great and is only missing tests: I've been placing all these optional field tests under the 'Parses a Feed with all possible fields' test.

Thanks again!

axispx commented 6 years ago

@xqwzts Thanks for the review.

The comments element is indeed not required per feed. That was a mistake on my part.

I also added test for the comments element for each individual item.

xqwzts commented 6 years ago

Merged. Thanks!