From afad39bf80265f74de100cf3550924a7916d02a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= Date: Fri, 3 Nov 2023 19:31:03 -0300 Subject: [PATCH] Use $ instead of \Z for end of string They're identical here, since re.M is not used, and the better-known should be used, for readability. --- bookwyrm/views/status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/views/status.py b/bookwyrm/views/status.py index 8dab11a27c..34b62d0b44 100644 --- a/bookwyrm/views/status.py +++ b/bookwyrm/views/status.py @@ -321,7 +321,7 @@ def format_links(content): def _unwrap(text): """split surrounding brackets and trailing punctuation from a string of text""" - punct = re.compile(r'([.,;:!?"’”»]+)\Z') + punct = re.compile(r'([.,;:!?"’”»]+)$') prefix = suffix = "" if punct.search(text):