mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Remove duplicate line lenghts from line unwrapping code.
This commit is contained in:
parent
5b8ec44fc7
commit
e426c9e60d
@ -56,6 +56,7 @@ def line_length(raw, percent):
|
|||||||
if not lengths:
|
if not lengths:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
lengths = list(set(lengths))
|
||||||
total = sum(lengths)
|
total = sum(lengths)
|
||||||
avg = total / len(lengths)
|
avg = total / len(lengths)
|
||||||
max_line = avg * 2
|
max_line = avg * 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user