From f53ac1cff82e5d7cbd71ded5f08037cdb699bba9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 14 Sep 2011 11:05:32 -0600 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/transforms/flatcss.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/transforms/flatcss.py b/src/calibre/ebooks/oeb/transforms/flatcss.py index 078174218e..6458ca80b0 100644 --- a/src/calibre/ebooks/oeb/transforms/flatcss.py +++ b/src/calibre/ebooks/oeb/transforms/flatcss.py @@ -321,7 +321,8 @@ class CSSFlattener(object): cssdict['margin-top'] = cssdict['margin-bottom'] = \ '%fem'%self.context.insert_blank_line_size indent_size = self.context.remove_paragraph_spacing_indent_size - if (self.context.remove_paragraph_spacing and indent_size != 0.0 and + keep_indents = indent_size == 0.0 and not self.context.insert_blank_line + if (self.context.remove_paragraph_spacing and not keep_indents and cssdict.get('text-align', None) not in ('center', 'right')): cssdict['text-indent'] = "%1.1fem" % indent_size