mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 19:55:24 +01:00
Remove duplicate line lenghts from line unwrapping code.
This commit is contained in:
parent
5b8ec44fc7
commit
e426c9e60d
1 changed files with 1 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ def line_length(raw, percent):
|
|||
if not lengths:
|
||||
return 0
|
||||
|
||||
lengths = list(set(lengths))
|
||||
total = sum(lengths)
|
||||
avg = total / len(lengths)
|
||||
max_line = avg * 2
|
||||
|
|
|
|||
Loading…
Reference in a new issue