From b21132b42820c89811a44f07c64b5cede198de45 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Nov 2019 14:59:11 +0530 Subject: [PATCH] cleanup --- src/calibre/ebooks/pdf/html_writer.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/pdf/html_writer.py b/src/calibre/ebooks/pdf/html_writer.py index 904b287521..cf2e67a8c1 100644 --- a/src/calibre/ebooks/pdf/html_writer.py +++ b/src/calibre/ebooks/pdf/html_writer.py @@ -406,12 +406,17 @@ def create_margin_files(container): # Link handling {{{ def add_anchors_markup(root, uuid, anchors): body = last_tag(root) - div = body.makeelement(XHTML('div'), id=uuid, style='display:block; page-break-before: always; break-before: always') + div = body.makeelement( + XHTML('div'), id=uuid, + style='display:block; page-break-before: always; break-before: always;' + ) body.append(div) def a(anchor): a = div.makeelement( - XHTML('a'), href='#' + anchor, style='white-space: pre; min-width: 10px; min-height: 10px; border: solid 1px') + XHTML('a'), href='#' + anchor, + style='white-space: pre; min-width: 10px; min-height: 10px; border: solid 1px;' + ) a.text = a.tail = ' ' div.append(a) tuple(map(a, anchors))