Split epub correction

This commit is contained in:
Pierre 2010-06-29 00:22:49 +02:00
parent 8ea26f96cf
commit 1e607a4f27

View File

@ -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