1
0
Fork 0

format_links: refactor; support multiple punctuation

This commit is contained in:
Adeodato Simó 2023-10-09 21:41:22 -03:00
parent 17d741039c
commit 294788aa1a
No known key found for this signature in database
GPG key ID: CDF447845F1A986F
2 changed files with 28 additions and 47 deletions

View file

@ -427,6 +427,10 @@ http://www.fish.com/"""
views.status.format_links(f"{url}."),
f'<a href="{url}">www.fish.com/</a>.',
)
self.assertEqual(
views.status.format_links(f"{url}!?!"),
f'<a href="{url}">www.fish.com/</a>!?!',
)
def test_format_links_punctuation_parens(self, *_):
"""ignore trailing punctuation and brackets combined"""