Skip to content

Commit

Permalink
Use $ instead of \Z for end of string
Browse files Browse the repository at this point in the history
They're identical here, since re.M is not used, and the better-known
should be used, for readability.
  • Loading branch information
dato committed Nov 3, 2023
1 parent c9b658d commit d4d0a7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bookwyrm/views/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,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):
Expand Down

0 comments on commit d4d0a7a

Please sign in to comment.