Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def link_urls(text):
"""
Enriches urls in the comment text with an anchor.
"""
parser = ttp.Parser(max_url_length=40)
parser._urls = []
return ttp.URL_REGEX.sub(parser._parse_urls, text)