We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a78ffa1 commit c2c1655Copy full SHA for c2c1655
comment_spell_check/utils/url_remove.py
@@ -16,7 +16,7 @@ def remove_urls(text):
16
The string with URLs removed.
17
"""
18
url_pattern = re.compile(
19
- r"(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&\'\(\)\*\+,;=.]+",
+ r"(?:https?:\/\/)?[\w.-]+\.[\w.-]+[^\s]*",
20
re.IGNORECASE,
21
)
22
return url_pattern.sub("", text)
0 commit comments