mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:04:12 +02:00
E-book viewer: When using heuristics to detect footnote links check for vertical-align set to top and bottom as well as sub and super
This commit is contained in:
parent
7c0a12659d
commit
fed8adbcde
2 changed files with 2 additions and 2 deletions
Binary file not shown.
|
|
@ -63,7 +63,7 @@ is_footnote_link = (node, url, linked_to_anchors) ->
|
|||
[x, num] = [node, 3]
|
||||
while x and num > 0
|
||||
style = window.getComputedStyle(x)
|
||||
if style.verticalAlign in ['sub', 'super']
|
||||
if style.verticalAlign in ['sub', 'super', 'top', 'bottom']
|
||||
return true
|
||||
x = x.parentNode
|
||||
num -= 1
|
||||
|
|
@ -72,7 +72,7 @@ is_footnote_link = (node, url, linked_to_anchors) ->
|
|||
children = (x for x in node.childNodes when x.nodeType == Node.ELEMENT_NODE)
|
||||
if children.length == 1
|
||||
style = window.getComputedStyle(children[0])
|
||||
if style.verticalAlign in ['sub', 'super']
|
||||
if style.verticalAlign in ['sub', 'super', 'top', 'bottom']
|
||||
return true
|
||||
|
||||
eid = node.getAttribute('id') or node.getAttribute('name')
|
||||
|
|
|
|||
Loading…
Reference in a new issue