From: Jan Szejko Date: Fri, 23 Nov 2018 15:04:42 +0000 (+0100) Subject: CRLF in epub X-Git-Tag: 1.7~7 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/e1874b83cbc052de4c83aaf31c4091a31280b2fb?ds=inline;hp=43f9887701dbe454dcaee6f4f68afe7e3d14ebe6 CRLF in epub --- diff --git a/librarian/epub.py b/librarian/epub.py index c802ec7..7fd6daf 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -462,6 +462,7 @@ def transform(wldoc, verbose=False, style=None, html_toc=False, doctype='' ) + html_string = re.sub(ur'([^\r])\n', ur'\1\r\n', html_string) zip.writestr('OPS/part%d.html' % chunk_counter, html_string) add_to_manifest(manifest, chunk_counter) add_to_spine(spine, chunk_counter)