1
0
mirror of https://git.sr.ht/~cadence/NewLeaf synced 2024-12-22 13:06:59 +00:00

Allow uppercase in URL domain

This commit is contained in:
Cadence Ember 2020-08-24 22:38:01 +12:00
parent 932f45c92d
commit f389bc1f48

View File

@ -35,7 +35,7 @@ def combine_runs_html(runs):
return result
def add_html_links(text):
r_link = re.compile(r"""https?://[a-z0-9-]+(?:\.[a-z0-9-]+)+(?:/[^\s,<>)]*)?""") # it's okay, I guess.
r_link = re.compile(r"""https?://[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+(?:/[^\s,<>)]*)?""") # it's okay, I guess.
match = r_link.search(text)
if match is not None:
link = match.group()