more refinements for the deployment
All checks were successful
Build container / Build (pull_request) Successful in 1m10s

This commit is contained in:
2025-07-29 15:58:34 +02:00
parent 29d951427d
commit f7478fb1e3
15 changed files with 180 additions and 99 deletions

View File

@@ -79,13 +79,13 @@ class JournalEntry(BaseModel):
"""Returns the text with all the frisky details hidden away"""
new_text = self.text.replace("<", "&lt;").replace(">", "&gt;").replace("&", "&amp;")
pattern = re.compile(
"("
"(((?<=(\.|\!|\?)\s)[A-Z])|(^[A-Z]))" # beginning of a sentence
"([^\.\!\?])+" # any character being part of a sentence
"((\:\))|😇|😈|[Ss]ex)" # the smiley
"([^\.\!\?])*" # continuation of sentence
"(\.|\!|\?|\,|$)" # end of the sentence
")"
r"("
r"(((?<=(\.|\!|\?)\s)[A-Z])|(^[A-Z]))" # beginning of a sentence
r"([^\.\!\?])+" # any character being part of a sentence
r"((\:\))|😇|😈|[Ss]ex)" # the smiley
r"([^\.\!\?])*" # continuation of sentence
r"(\.|\!|\?|\,|$)" # end of the sentence
r")"
)
matches = pattern.findall(new_text)
for match in matches: