diff --git a/resources/compiled_coffeescript.zip b/resources/compiled_coffeescript.zip index 5532c771a9..e1bd571cd8 100644 Binary files a/resources/compiled_coffeescript.zip and b/resources/compiled_coffeescript.zip differ diff --git a/src/calibre/ebooks/oeb/display/extract.coffee b/src/calibre/ebooks/oeb/display/extract.coffee index 3e1b96a035..33247fd48d 100644 --- a/src/calibre/ebooks/oeb/display/extract.coffee +++ b/src/calibre/ebooks/oeb/display/extract.coffee @@ -75,7 +75,9 @@ is_footnote_link = (node, url, linked_to_anchors) -> if children.length == 1 style = window.getComputedStyle(children[0]) if style.display in ['inline', 'inline-block'] and style.verticalAlign in ['sub', 'super', 'top', 'bottom'] - return true + text_children = (x for x in node.childNodes when x.nodeType == Node.TEXT_NODE and x.nodeValue and /\S+/.test(x.nodeValue)) + if not text_children.length + return true eid = node.getAttribute('id') or node.getAttribute('name') if eid and linked_to_anchors.hasOwnProperty(eid)