diff --git a/lib/reader.js b/lib/reader.js index cb9c0b5..1393767 100644 --- a/lib/reader.js +++ b/lib/reader.js @@ -439,10 +439,8 @@ function getCandidates ($, options) { } // cache innerText here. var childDom = child.get(0) - var innerText - if (childDom.type === 'text' && (innerText = childDom.data.trim())) { - child.replaceWith('

' + innerText + '

') - innerText = null + if (childDom.type === 'text' && childDom.data.trim()) { + child.replaceWith('' + childDom.data + '') } }) } @@ -452,7 +450,7 @@ function getCandidates ($, options) { } }) // assign scores to `P`s that were turned from DIV by us. - $('p.' + extBonusKey, 'body').each(function () { + $('p.' + extBonusKey + ',span.' + extBonusKey, 'body').each(function () { getNodeWeight($(this), cans, options) }) return cans