TXT Input: Fix option to remove indents at the start of lines breaking conversion of markdown documents. Fixes #1814989 ["Remove indents at the beginning of lines" setting removes paragraph breaks in conversion](https://bugs.launchpad.net/calibre/+bug/1814989)

This commit is contained in:
Kovid Goyal 2019-02-07 10:03:43 +05:30
parent 215c05d2e2
commit 2e141a6175
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -200,8 +200,7 @@ def remove_indents(txt):
'''
Remove whitespace at the beginning of each line.
'''
txt = re.sub('(?miu)^\s+', '', txt)
return txt
return '\n'.join([l.lstrip() for l in txt.splitlines()])
def opf_writer(path, opf_name, manifest, spine, mi):