From 1e607a4f27076378d09b20fce00cbbe67bad729b Mon Sep 17 00:00:00 2001 From: Pierre Date: Tue, 29 Jun 2010 00:22:49 +0200 Subject: [PATCH] Split epub correction --- src/calibre/ebooks/txt/processor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/txt/processor.py b/src/calibre/ebooks/txt/processor.py index cae715d6d6..894991858e 100644 --- a/src/calibre/ebooks/txt/processor.py +++ b/src/calibre/ebooks/txt/processor.py @@ -56,7 +56,8 @@ def convert_markdown(txt, title='', disable_toc=False): return HTML_TEMPLATE % (title, md.convert(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) return txt