mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-05 08:35:19 +01:00
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:
parent
f62b520416
commit
97536e397f
1 changed files with 4 additions and 0 deletions
|
|
@ -73,6 +73,10 @@ def clean_text(self, text):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue