Skip to content

Commit

Permalink
[fix] some urls will be misjudged to phone (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
hxphieno authored Apr 13, 2024
1 parent 8088c99 commit 4feb8a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/utils/regex.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ LinkType getMatchedType(String match) {
late LinkType type;
if (RegExp(emailRegExp).hasMatch(match)) {
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;
} else if (RegExp(userTagRegExp).hasMatch(match)) {
type = LinkType.userTag;
} else if (RegExp(urlRegExp).hasMatch(match)) {
type = LinkType.url;
} else if (RegExp(hashtagRegExp).hasMatch(match)) {
} else if (RegExp(hashtagRegExp).hasMatch(match)) {
type = LinkType.hashTag;
}
return type;
Expand Down

0 comments on commit 4feb8a2

Please sign in to comment.