separaters

This commit is contained in:
Your Name 2024-06-17 09:33:50 -04:00 committed by Henri Dickson
parent 77eefa9e13
commit 7d9c58edf0

View file

@ -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 = {