1
0
Fork 0

Remove links trailing punctuation

This commit is contained in:
Joachim 2023-07-31 22:12:37 +02:00
parent c29ca5ad32
commit e37ed8ea5e
2 changed files with 25 additions and 0 deletions

View file

@ -428,6 +428,14 @@ http://www.fish.com/"""
f'(<a href="{url}">www.fish.com/</a>)',
)
def test_format_links_punctuation(self, *_):
"""dont take trailing punctuation into account pls"""
url = "http://www.fish.com/"
self.assertEqual(
views.status.format_links(f"{url}."),
f'<a href="{url}">www.fish.com/</a>.',
)
def test_format_links_special_chars(self, *_):
"""find and format urls into a tags"""
url = "https://archive.org/details/dli.granth.72113/page/n25/mode/2up"