[fix] some urls will be misjudged to phone (#16)
This commit is contained in:
parent
8088c99085
commit
4feb8a26c6
|
@ -59,13 +59,13 @@ LinkType getMatchedType(String match) {
|
||||||
late LinkType type;
|
late LinkType type;
|
||||||
if (RegExp(emailRegExp).hasMatch(match)) {
|
if (RegExp(emailRegExp).hasMatch(match)) {
|
||||||
type = LinkType.email;
|
type = LinkType.email;
|
||||||
} else if (RegExp(phoneRegExp).hasMatch(match)) {
|
} else if (RegExp(urlRegExp).hasMatch(match)) {
|
||||||
|
type = LinkType.url;
|
||||||
|
}else if (RegExp(phoneRegExp).hasMatch(match)) {
|
||||||
type = LinkType.phone;
|
type = LinkType.phone;
|
||||||
} else if (RegExp(userTagRegExp).hasMatch(match)) {
|
} else if (RegExp(userTagRegExp).hasMatch(match)) {
|
||||||
type = LinkType.userTag;
|
type = LinkType.userTag;
|
||||||
} else if (RegExp(urlRegExp).hasMatch(match)) {
|
} else if (RegExp(hashtagRegExp).hasMatch(match)) {
|
||||||
type = LinkType.url;
|
|
||||||
} else if (RegExp(hashtagRegExp).hasMatch(match)) {
|
|
||||||
type = LinkType.hashTag;
|
type = LinkType.hashTag;
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
|
|
Loading…
Reference in New Issue