mirror of https://gitlab.com/bashrc2/epicyon
Comments
parent
083dddea0d
commit
5a1cece30e
3
utils.py
3
utils.py
|
|
@ -4039,10 +4039,11 @@ def resembles_domain(text: str) -> bool:
|
|||
'"' in text or '(' in text or ')' in text:
|
||||
return False
|
||||
|
||||
# conventional domain or yggdrasil address
|
||||
# conventional domain
|
||||
if '.' in text and '[' not in text and ']' not in text:
|
||||
return True
|
||||
|
||||
# yggdrasil address
|
||||
if (text.startswith('[') and text.endswith(']') and ':' in text):
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue