Compare commits

..

No commits in common. "87e5b1be9f2aec6d6eb45f2b22eea84cabf72e36" and "21aa118ffa08e3e7e6cd879c7f9755869c53813b" have entirely different histories.

1 changed files with 2 additions and 9 deletions

View File

@ -1,4 +1,3 @@
import re
from dataclasses import dataclass, field
from datetime import datetime
from typing import Optional
@ -72,14 +71,8 @@ class UforaNotification(EmbedBaseModel):
def _clean_content(self, text: str):
# Escape *-characters because they mess up the layout
# and non-breaking-spaces
text = text.replace("*", "\\*").replace("\xa0", " ")
text = md(text)
# Squash consecutive newlines and ignore spaces inbetween
subbed = re.sub(r"\n+\s?\n+", "\n\n", text)
return subbed
text = text.replace("*", "\\*")
return md(text)
def _published_datetime(self) -> datetime:
"""Get a datetime instance of the publication date"""