mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Split epub correction
This commit is contained in:
parent
8ea26f96cf
commit
1e607a4f27
@ -56,7 +56,8 @@ def convert_markdown(txt, title='', disable_toc=False):
|
|||||||
return HTML_TEMPLATE % (title, md.convert(txt))
|
return HTML_TEMPLATE % (title, md.convert(txt))
|
||||||
|
|
||||||
def separate_paragraphs_single_line(txt):
|
def separate_paragraphs_single_line(txt):
|
||||||
txt = txt.replace('(\r\n|\r)', '\n')
|
txt = txt.replace('\r\n', '\n')
|
||||||
|
txt = txt.replace('\r', '\n')
|
||||||
txt = re.sub(u'(?<=.)\n(?=.)', u'\n\n', txt)
|
txt = re.sub(u'(?<=.)\n(?=.)', u'\n\n', txt)
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user