mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
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.
This commit is contained in:
parent
954a02126e
commit
afad39bf80
1 changed files with 1 additions and 1 deletions
|
@ -321,7 +321,7 @@ def format_links(content):
|
||||||
|
|
||||||
def _unwrap(text):
|
def _unwrap(text):
|
||||||
"""split surrounding brackets and trailing punctuation from a string of text"""
|
"""split surrounding brackets and trailing punctuation from a string of text"""
|
||||||
punct = re.compile(r'([.,;:!?"’”»]+)\Z')
|
punct = re.compile(r'([.,;:!?"’”»]+)$')
|
||||||
prefix = suffix = ""
|
prefix = suffix = ""
|
||||||
|
|
||||||
if punct.search(text):
|
if punct.search(text):
|
||||||
|
|
Loading…
Reference in a new issue