diff --git a/plugin/js/parsers/NoblemtlParser.js b/plugin/js/parsers/NoblemtlParser.js index 99e3167a..6cd7b1fb 100644 --- a/plugin/js/parsers/NoblemtlParser.js +++ b/plugin/js/parsers/NoblemtlParser.js @@ -44,11 +44,17 @@ class NoblemtlParser extends Parser{ let toRemove = [...element.querySelectorAll("p")] .filter(p => p.style.opacity === "0"); util.removeElements(toRemove); + util.removeElements(this.findEmptySpanElements(element)); util.removeChildElementsMatchingCss(element, "span.modern-footnotes-footnote__note"); util.removeChildElementsMatchingCss(element, "span.footnote_tooltip"); super.removeUnwantedElementsFromContentElement(element); } + findEmptySpanElements(element) { + return [...element.querySelectorAll("span")] + .filter(s => !s.firstChild); + } + findChapterTitle(dom) { return dom.querySelector("h1.entry-title"); }