diff --git a/src/calibre/ebooks/pdf/html_writer.py b/src/calibre/ebooks/pdf/html_writer.py index 91f51016bd..0004c0903b 100644 --- a/src/calibre/ebooks/pdf/html_writer.py +++ b/src/calibre/ebooks/pdf/html_writer.py @@ -282,10 +282,10 @@ def add_anchors_markup(root, uuid, anchors): body.append(div) for i, anchor in enumerate(anchors): div.append(div.makeelement(XHTML('a'), href='#' + anchor)) - div[-1].text = '{}'.format(i) + div[-1].text = '\xa0' div[-1].tail = ' ' div.append(div.makeelement(XHTML('a'), href='#' + uuid)) - div[-1].text = 'top' + div[-1].text = '\xa0' div[-1].tail = ' '