mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
cleanup
This commit is contained in:
parent
580d0e2ba7
commit
b21132b428
@ -406,12 +406,17 @@ def create_margin_files(container):
|
|||||||
# Link handling {{{
|
# Link handling {{{
|
||||||
def add_anchors_markup(root, uuid, anchors):
|
def add_anchors_markup(root, uuid, anchors):
|
||||||
body = last_tag(root)
|
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)
|
body.append(div)
|
||||||
|
|
||||||
def a(anchor):
|
def a(anchor):
|
||||||
a = div.makeelement(
|
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 = ' '
|
a.text = a.tail = ' '
|
||||||
div.append(a)
|
div.append(a)
|
||||||
tuple(map(a, anchors))
|
tuple(map(a, anchors))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user