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:
Kovid Goyal 2017-08-10 10:54:09 +05:30
parent 6f0c724dad
commit e9f82abf39
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -724,6 +724,12 @@ class Convert(object):
for border_style, blocks in self.block_runs: for border_style, blocks in self.block_runs:
paras = tuple(rmap[p] for p in blocks) paras = tuple(rmap[p] for p in blocks)
parent = paras[0].getparent() parent = paras[0].getparent()
if parent.tag in ('ul', 'ol'):
ul = parent
parent = ul.getparent()
idx = parent.index(ul)
frame = DIV(ul)
else:
idx = parent.index(paras[0]) idx = parent.index(paras[0])
frame = DIV(*paras) frame = DIV(*paras)
parent.insert(idx, frame) parent.insert(idx, frame)