From 580d0e2ba78ef480865a3f35eb41bd87b2b70e11 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Nov 2019 14:44:34 +0530 Subject: [PATCH] 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) --- src/calibre/ebooks/pdf/html_writer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calibre/ebooks/pdf/html_writer.py b/src/calibre/ebooks/pdf/html_writer.py index 54c37e7886..904b287521 100644 --- a/src/calibre/ebooks/pdf/html_writer.py +++ b/src/calibre/ebooks/pdf/html_writer.py @@ -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('#')