Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdaat committed Nov 19, 2019
1 parent 7aced17 commit 54db6c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ def replace_urls(text, replace_with="<URL>"):
str: Output sentence with replaced url
"""
url_regex = re.compile(r"((http|ftp|https):\/\/)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b(.*)")
text = url_regex.sub(replace_with, r)
text = url_regex.sub(replace_with, text)

return text

0 comments on commit 54db6c2

Please sign in to comment.