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 954a021 commit afad39b
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 @@ -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):
Expand Down

0 comments on commit afad39b

Please sign in to comment.