mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
PDF Output: Workaround for weird added anchor markup rendering with Qt 5.13.2
This commit is contained in:
parent
b21132b428
commit
f362901931
@ -408,14 +408,15 @@ def add_anchors_markup(root, uuid, anchors):
|
|||||||
body = last_tag(root)
|
body = last_tag(root)
|
||||||
div = body.makeelement(
|
div = body.makeelement(
|
||||||
XHTML('div'), id=uuid,
|
XHTML('div'), id=uuid,
|
||||||
style='display:block; page-break-before: always; break-before: always;'
|
style='display:block !important; page-break-before: always !important; break-before: always !important; white-space: pre-wrap !important'
|
||||||
)
|
)
|
||||||
|
div.text = '\n\n'
|
||||||
body.append(div)
|
body.append(div)
|
||||||
|
|
||||||
def a(anchor):
|
def a(anchor):
|
||||||
a = div.makeelement(
|
a = div.makeelement(
|
||||||
XHTML('a'), href='#' + anchor,
|
XHTML('a'), href='#' + anchor,
|
||||||
style='white-space: pre; min-width: 10px; min-height: 10px; border: solid 1px;'
|
style='min-width: 10px !important; min-height: 10px !important; border: solid 1px !important;'
|
||||||
)
|
)
|
||||||
a.text = a.tail = ' '
|
a.text = a.tail = ' '
|
||||||
div.append(a)
|
div.append(a)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user