TXT Input: Fix a regression in 5.39 that caused the option to remove indents also removing blank lines. Fixes #1973591 [TXT input Paragraph Style: single function failed](https://bugs.launchpad.net/calibre/+bug/1973591)

This commit is contained in:
Kovid Goyal 2022-05-25 12:51:21 +05:30
parent 463a0b459f
commit 79006c3460
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -220,7 +220,7 @@ def remove_indents(txt):
''' '''
Remove whitespace at the beginning of each line. 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): def opf_writer(path, opf_name, manifest, spine, mi):