Skip to content

Commit 90c574f

Browse files
refactor(android): url matches linkRegex
Co-authored-by: Kacper Żółkiewski <74975508+kacperzolkiewski@users.noreply.github.com>
1 parent edad1dd commit 90c574f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

android/src/main/java/com/swmansion/enriched/common/parser/EnrichedParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,7 @@ private static void startA(Editable text, Attributes attributes) {
875875

876876
private static boolean urlMatchesLinkRegex(String url, Pattern linkRegex) {
877877
if (linkRegex == null) return false;
878-
Matcher m = linkRegex.matcher(url);
879-
return m.find() && m.start() == 0 && m.end() == url.length();
878+
return linkRegex.matcher(url).matches();
880879
}
881880

882881
private static <T> void endA(

0 commit comments

Comments
 (0)