mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-11 11:52:07 +08:00
Fix divide by zero error on chapters with no content.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user