diff --git a/src/calibre/ebooks/txt/processor.py b/src/calibre/ebooks/txt/processor.py index afeb93bc1f..3f427d1f37 100644 --- a/src/calibre/ebooks/txt/processor.py +++ b/src/calibre/ebooks/txt/processor.py @@ -220,7 +220,7 @@ def remove_indents(txt): ''' Remove whitespace at the beginning of each line. ''' - return re.sub(r'^\s+', '', txt, flags=re.MULTILINE) + return re.sub(r'^[\r\t\f\v ]+', r'', txt, flags=re.MULTILINE) def opf_writer(path, opf_name, manifest, spine, mi):