mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
215c05d2e2
commit
2e141a6175
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user