Skip to content

Commit

Permalink
Add backwards compatibility for inky
Browse files Browse the repository at this point in the history
  • Loading branch information
kball committed Jun 17, 2016
1 parent 5cc2bc6 commit 9d56640
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/inky.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Inky.prototype.releaseTheKraken = function(xmlString, cheerioOpts) {
// <center> is an exception: the selector is center:not([data-parsed])
// Otherwise the parser gets caught in an infinite loop where it continually tries to process the same <center> tags
//
// backwards compatible with old versions that pass in cheerio
if(typeof(xmlString) !== 'string') {
xmlString = xmlString.html();
}
var set = Inky.extractRaws(xmlString);
var raws = set[0], string = set[1];
var $ = cheerio.load(string, Inky.mergeCheerioOpts(cheerioOpts));
Expand Down

0 comments on commit 9d56640

Please sign in to comment.