Fix word counter bug (#1816)

This commit is contained in:
Veronica Berglyd Olsen
2024-04-13 00:37:21 +02:00
parent 61e634a86c
commit 3e711ebe7f
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -57,6 +57,7 @@ def preProcessText(text: str, keepHeaders: bool = True) -> list[str]:
continue
if line[0] == ">":
line = line.lstrip(">").lstrip(" ")
if line: # Above check can return empty line (Issue #1816)
if line[-1] == "<":
line = line.rstrip("<").rstrip(" ")
if "[" in line: