mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Output: Ignore invalid text-indent values in the input document instead of erroring out. Fixes #1618869 [EPUB to DOCX conversion fails](https://bugs.launchpad.net/calibre/+bug/1618869)
This commit is contained in:
parent
0f0ba7af23
commit
d6c3a1b1e1
@ -485,8 +485,12 @@ class BlockStyle(DOCXStyle):
|
||||
self.background_color = None
|
||||
self.text_align = 'left'
|
||||
else:
|
||||
self.text_indent = int(css['text-indent'] * 20)
|
||||
self.css_text_indent = css._get('text-indent')
|
||||
try:
|
||||
self.text_indent = int(css['text-indent'] * 20)
|
||||
self.css_text_indent = css._get('text-indent')
|
||||
except (TypeError, ValueError):
|
||||
self.text_indent = 0
|
||||
self.css_text_indent = None
|
||||
try:
|
||||
self.line_height = max(0, int(css.lineHeight * 20))
|
||||
except (TypeError, ValueError):
|
||||
|
Loading…
x
Reference in New Issue
Block a user