format_links: refactor; support multiple punctuation
This commit is contained in:
parent
17d741039c
commit
294788aa1a
2 changed files with 28 additions and 47 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue