mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Input: Avoid using the value attribute for simple numbered lists
This commit is contained in:
parent
4f87c0d39e
commit
1999622f44
@ -298,7 +298,7 @@ class Numbering(object):
|
||||
for attr in ('list-lvl', 'list-id', 'list-template'):
|
||||
child.attrib.pop(attr, None)
|
||||
val = int(child.get('value'))
|
||||
if last_val == val - 1 or wrap.tag == 'ul':
|
||||
if last_val == val - 1 or wrap.tag == 'ul' or (last_val is None and val == 1):
|
||||
child.attrib.pop('value')
|
||||
last_val = val
|
||||
current_run[-1].tail = '\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user