This commit is contained in:
Thibaud Chupin 2025-04-17 08:39:13 +00:00 committed by GitHub
commit ca4a88f7a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -223,7 +223,8 @@ SENTENCE_SPLITTER_ONLY_NEWLINE = re.compile("\n")
def split_title(text: str) -> tuple[str, str]: def split_title(text: str) -> tuple[str, str]:
"""Splits the first sentence off from a text.""" """Splits the first sentence off from a text."""
sep = SENTENCE_SPLITTER_ONLY_NEWLINE.search(text.lstrip()) text = text.lstrip()
sep = SENTENCE_SPLITTER_ONLY_NEWLINE.search(text)
if not sep: if not sep:
sep = SENTENCE_SPLITTER.search(text) sep = SENTENCE_SPLITTER.search(text)
if not sep: if not sep: