mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
FB2 Output: Put line breaks between paragraphs on a separate line
This commit is contained in:
parent
3b8d769128
commit
cb45766216
@ -103,6 +103,10 @@ class FB2MLizer(object):
|
|||||||
if self.opts.insert_blank_line:
|
if self.opts.insert_blank_line:
|
||||||
text = re.sub(r'(?miu)</p>', '</p><empty-line/>', text)
|
text = re.sub(r'(?miu)</p>', '</p><empty-line/>', text)
|
||||||
|
|
||||||
|
# Put line breaks between paragraphs on a separate line.
|
||||||
|
text = re.sub(r'(?miu)</(p|title)>\s*<empty-line/>', r'</\1>\n<empty-line/>', text)
|
||||||
|
text = re.sub(r'(?miu)<empty-line/>\s*<p>', '<empty-line/>\n<p>', text)
|
||||||
|
|
||||||
return text
|
return text
|
||||||
|
|
||||||
def fb2_header(self):
|
def fb2_header(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user