fix: accept domain-only URLs like google.com
The is_url() function now accepts any string with a dot and no spaces, not just URLs with http:// or containing /. This allows /update 2 -link google.com to properly set the link instead of treating google.com as text.
This commit is contained in:
@@ -71,7 +71,9 @@ def parse_args(
|
||||
return False
|
||||
if s.startswith("http://") or s.startswith("https://"):
|
||||
return True
|
||||
return "." in s and "/" in s
|
||||
if "." in s and " " not in s:
|
||||
return True
|
||||
return False
|
||||
|
||||
i = 0
|
||||
while i < len(args):
|
||||
|
||||
Reference in New Issue
Block a user