mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Input: Fix framed lists being rendered with the frame inside the bullets instead of outside it. Fixes #1709569 [Converting from DOCX - problem with framed paragraphs and lists](https://bugs.launchpad.net/calibre/+bug/1709569)
This commit is contained in:
parent
6f0c724dad
commit
e9f82abf39
@ -724,8 +724,14 @@ class Convert(object):
|
||||
for border_style, blocks in self.block_runs:
|
||||
paras = tuple(rmap[p] for p in blocks)
|
||||
parent = paras[0].getparent()
|
||||
idx = parent.index(paras[0])
|
||||
frame = DIV(*paras)
|
||||
if parent.tag in ('ul', 'ol'):
|
||||
ul = parent
|
||||
parent = ul.getparent()
|
||||
idx = parent.index(ul)
|
||||
frame = DIV(ul)
|
||||
else:
|
||||
idx = parent.index(paras[0])
|
||||
frame = DIV(*paras)
|
||||
parent.insert(idx, frame)
|
||||
self.framed_map[frame] = css = border_style.css
|
||||
self.styles.register(css, 'frame')
|
||||
|
Loading…
x
Reference in New Issue
Block a user