mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -73,6 +73,10 @@ class FB2MLizer(object):
|
|||||||
text = re.sub(r'(?miu)<p>\s*</p>', '', text)
|
text = re.sub(r'(?miu)<p>\s*</p>', '', text)
|
||||||
text = re.sub(r'(?miu)\s+</p>', '</p>', text)
|
text = re.sub(r'(?miu)\s+</p>', '</p>', text)
|
||||||
text = re.sub(r'(?miu)</p><p>', '</p>\n\n<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
|
return text
|
||||||
|
|
||||||
def fb2_header(self):
|
def fb2_header(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user