diff --git a/src/wikipedia.js b/src/wikipedia.js index 0053b5c7..04079ec5 100644 --- a/src/wikipedia.js +++ b/src/wikipedia.js @@ -32,7 +32,7 @@ function prepare (div) { } var p = content.firstChild.firstChild - while (p && p.tagName !== 'P') { + while (p && (p.tagName !== 'P' || p.className !== '' || p.textContent.match(/^\s*$/))) { p = p.nextSibling }