Skip to content
Browse files

handle RDF feed as RSS

  • Loading branch information...
1 parent 954106a commit cf3ee8c52bd57af0f2511a433bf20523a30194c8 @sentientwaffle committed Mar 21, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 index.js
  2. +2 −2 test/index.test.js
View
2 index.js
@@ -42,7 +42,7 @@ var FeedRead = module.exports = function(feed_url, callback) {
//
// Returns "atom", "rss", or false when it is neither.
FeedRead.identify = function(xml) {
- if (/<rss\b/i.test(xml)) {
+ if (/<(rss|rdf)\b/i.test(xml)) {
return "rss";
} else if (/<feed\b/i.test(xml)) {
return "atom";
View
4 test/index.test.js
@@ -74,8 +74,8 @@ describe("feed", function() {
});
});
- it("parses funny atom correctly", function(done) {
- feed("http://davidwalsh.name/feed/atom", function(err, articles) {
+ it("handles RDF as RSS", function(done) {
+ feed("http://rss.slashdot.org/Slashdot/slashdot", function(err, articles) {
should.not.exist(err);
articles.should.be.an.instanceof(Array);
done();

0 comments on commit cf3ee8c

Please sign in to comment.
Something went wrong with that request. Please try again.