diff --git a/jrnl/journals/Entry.py b/jrnl/journals/Entry.py index 6c45303eb..7dbbbde5f 100644 --- a/jrnl/journals/Entry.py +++ b/jrnl/journals/Entry.py @@ -223,7 +223,8 @@ def __ne__(self, other: "Entry"): def split_title(text: str) -> tuple[str, str]: """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: sep = SENTENCE_SPLITTER.search(text) if not sep: