From aa2aa3d2ef8bb89acf7a6e943be9a91391d9cdd0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 May 2013 16:36:09 +0530 Subject: [PATCH] Ignore line height of 1 --- src/calibre/ebooks/docx/block_styles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/block_styles.py b/src/calibre/ebooks/docx/block_styles.py index b501580042..eef68a184f 100644 --- a/src/calibre/ebooks/docx/block_styles.py +++ b/src/calibre/ebooks/docx/block_styles.py @@ -271,7 +271,10 @@ class ParagraphStyle(object): if val is not inherit: c['margin-%s' % edge] = val - for x in ('text_indent', 'text_align', 'line_height', 'background_color'): + if self.line_height not in {inherit, '1'}: + c['line-height'] = self.line_height + + for x in ('text_indent', 'text_align', 'background_color'): val = getattr(self, x) if val is not inherit: c[x.replace('_', '-')] = val