Remove links trailing punctuation
This commit is contained in:
parent
c29ca5ad32
commit
e37ed8ea5e
2 changed files with 25 additions and 0 deletions
|
@ -428,6 +428,14 @@ http://www.fish.com/"""
|
|||
f'(<a href="{url}">www.fish.com/</a>)',
|
||||
)
|
||||
|
||||
def test_format_links_punctuation(self, *_):
|
||||
"""don’t 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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue