|
|
|
@ -50,6 +50,9 @@ function Readability(doc, options) {
|
|
|
|
|
this._charThreshold = options.charThreshold || this.DEFAULT_CHAR_THRESHOLD;
|
|
|
|
|
this._classesToPreserve = this.CLASSES_TO_PRESERVE.concat(options.classesToPreserve || []);
|
|
|
|
|
this._keepClasses = !!options.keepClasses;
|
|
|
|
|
this._serializer = options.serializer || function(el) {
|
|
|
|
|
return el.innerHTML;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Start with all flags set
|
|
|
|
|
this._flags = this.FLAG_STRIP_UNLIKELYS |
|
|
|
|
@ -2057,7 +2060,7 @@ Readability.prototype = {
|
|
|
|
|
title: this._articleTitle,
|
|
|
|
|
byline: metadata.byline || this._articleByline,
|
|
|
|
|
dir: this._articleDir,
|
|
|
|
|
content: articleContent.innerHTML,
|
|
|
|
|
content: this._serializer(articleContent),
|
|
|
|
|
textContent: textContent,
|
|
|
|
|
length: textContent.length,
|
|
|
|
|
excerpt: metadata.excerpt,
|
|
|
|
|