From 7d9c58edf04488093a9066ce7de93ef4e3330cae Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 17 Jun 2024 09:33:50 -0400 Subject: [PATCH] separaters --- journal/models/note.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/journal/models/note.py b/journal/models/note.py index 58b7ec64..54b10ca7 100644 --- a/journal/models/note.py +++ b/journal/models/note.py @@ -27,6 +27,8 @@ _progress2 = re.compile( _number = re.compile(r"^[\s\d\:\.]+$") +_separaters = {"–", "―", "−", "—", "-"} + class Note(Content): class ProgressType(models.TextChoices): @@ -117,7 +119,7 @@ class Note(Content): if post.local: # strip footer from local post if detected lines = content.splitlines() - if len(lines) > 2 and lines[-2].strip() in ["—", "-"]: + if len(lines) > 2 and lines[-2].strip() in _separaters: content = "\n".join(lines[:-2]) footer = lines[-2:] params = {