From 6305d5c64716f79d5af56b4cd19fa0f2151ececa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 11 Apr 2016 04:20:55 +0530 Subject: [PATCH] E-book viewer: Fix a link that has some text along with a superscript/subscript being incorrectly detected as a footnote link --- resources/compiled_coffeescript.zip | Bin 106998 -> 107465 bytes src/calibre/ebooks/oeb/display/extract.coffee | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/compiled_coffeescript.zip b/resources/compiled_coffeescript.zip index 5532c771a9b381b38b8b03e8348f4ba1282d021a..e1bd571cd8ec6f47fc4765296a15e7b91be94096 100644 GIT binary patch delta 544 zcmex%nC;|owheBHd|67}9-1CKW$QH=7}je})?Xz#ySy6>1U#u0KoUoH^^0fkfDN`MVqSWHjoRVT|E(JI!N=-AJ{=l12VlscB z)Z|4wg(qdPF`7=cFH{r-si{z~1?oyOjn0aN=$f2cs4!XKAg^?VUS57mYFJ`UX{v&n znu2~zu(rNlNosM4M#bcSgW{9t#&AsLPiLLA8#y|Cp+$3oc|7 znf`4)qvP~|`9M>EMww1OumI==p81SE(^VHTx=ug0fRTN=-2w zrX?kr7?=VD5-rRP(h`jl4bxJlPguk#KK;Q0M#t#^i-5iZ8!Wnr(R%v)MT{Ji<@Rw* ipS_q-ce>Le#? 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)