mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
TXT Output: Fix max line length option not working
py3 regression. Fixes #1941992 [TXT Output crashes when --max-line-length option is set](https://bugs.launchpad.net/calibre/+bug/1941992)
This commit is contained in:
parent
803c3826fd
commit
9b46b4ab76
@ -150,8 +150,8 @@ class TXTMLizer(object):
|
||||
text = re.sub(r'(?u)^[ \n]+', '', text)
|
||||
|
||||
if self.opts.max_line_length:
|
||||
max_length = self.opts.max_line_length
|
||||
if self.opts.max_line_length < 25 and not self.opts.force_max_line_length:
|
||||
max_length = int(self.opts.max_line_length)
|
||||
if max_length < 25 and not self.opts.force_max_line_length:
|
||||
max_length = 25
|
||||
short_lines = []
|
||||
lines = text.splitlines()
|
||||
|
Loading…
x
Reference in New Issue
Block a user