mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Do not add anchors linked from the current file to linked_to_anchors
This commit is contained in:
parent
b70d23f3e4
commit
852007e8c7
@ -128,7 +128,10 @@ class Footnotes(object):
|
|||||||
return # Not viewing a local file
|
return # Not viewing a local file
|
||||||
dest_path = self.spine_path(qurl.toLocalFile())
|
dest_path = self.spine_path(qurl.toLocalFile())
|
||||||
if dest_path is not None:
|
if dest_path is not None:
|
||||||
linked_to_anchors = {anchor:0 for path, anchor in dest_path.verified_links if path == current_path}
|
if dest_path == current_path:
|
||||||
|
linked_to_anchors = {}
|
||||||
|
else:
|
||||||
|
linked_to_anchors = {anchor:0 for path, anchor in dest_path.verified_links if path == current_path}
|
||||||
self.view.document.bridge_value = linked_to_anchors
|
self.view.document.bridge_value = linked_to_anchors
|
||||||
if a.evaluateJavaScript('calibre_extract.is_footnote_link(this)'):
|
if a.evaluateJavaScript('calibre_extract.is_footnote_link(this)'):
|
||||||
if dest_path not in self.known_footnote_targets:
|
if dest_path not in self.known_footnote_targets:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user