mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Merge 070350febb
into e5fc8be2a8
This commit is contained in:
commit
ca4a88f7a7
1 changed files with 2 additions and 1 deletions
|
@ -223,7 +223,8 @@ SENTENCE_SPLITTER_ONLY_NEWLINE = re.compile("\n")
|
|||
|
||||
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:
|
||||
|
|
Loading…
Add table
Reference in a new issue