Fix word counter bug (#1816)

This commit is contained in:
Veronica Berglyd Olsen committed 2024-04-13 00:37:21 +02:00
1 parent 61e634a86c
commit 3e711ebe7f
2 files changed
+7 -2

No files matched your search

+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: