FB2 Output: add blank line after paragraphs when insert-blank-line option used. Use <empty-line /> instead of CSS because not many readers support CSS in FB2 files.

This commit is contained in:
John Schember 2010-12-13 18:38:37 -05:00
parent f62b520416
commit 97536e397f

View File

@ -73,6 +73,10 @@ class FB2MLizer(object):
text = re.sub(r'(?miu)<p>\s*</p>', '', text)
text = re.sub(r'(?miu)\s+</p>', '</p>', text)
text = re.sub(r'(?miu)</p><p>', '</p>\n\n<p>', text)
if self.opts.insert_blank_line:
text = re.sub(r'(?miu)</p>', '</p><empty-line />', text)
return text
def fb2_header(self):