mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
PDF Output: Fix links that go to destinations in the same file not working. Fixes #1849529 [Footnotes Broken When Converting From EPUB to PDF](https://bugs.launchpad.net/calibre/+bug/1849529)
This commit is contained in:
parent
018bf4697b
commit
580d0e2ba7
@ -447,11 +447,9 @@ def make_anchors_unique(container, log):
|
||||
url += '#'
|
||||
if url.startswith('#'):
|
||||
href, frag = base, url[1:]
|
||||
name = base
|
||||
else:
|
||||
href, frag = url.partition('#')[::2]
|
||||
if base is None:
|
||||
name = href
|
||||
else:
|
||||
name = container.href_to_name(href, base)
|
||||
if not name:
|
||||
return url.rstrip('#')
|
||||
|
Loading…
x
Reference in New Issue
Block a user