mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 02:51:48 +02:00
Fix divide by zero error on chapters with no content.
This commit is contained in:
parent
d398b62c1a
commit
250121e137
1 changed files with 3 additions and 0 deletions
|
|
@ -137,6 +137,9 @@ def replace_br_with_p(body):
|
|||
contentLinesSum += lineLen
|
||||
if lineLen > longestLineLength:
|
||||
longestLineLength = lineLen
|
||||
|
||||
if contentLines == 0:
|
||||
contentLines = 1
|
||||
|
||||
averageLineLength = contentLinesSum/contentLines
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue