perf(richtext): collapse nowhere-link classifier into the existing URL branches
This commit is contained in:
+6
-4
@@ -332,13 +332,15 @@ class RichTextParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (urls.withoutScheme.contains(word) || urls.withScheme.contains(word)) {
|
if (urls.withoutScheme.contains(word)) {
|
||||||
parseNowhereLink(word)?.let { return it }
|
parseNowhereLink(word)?.let { return it }
|
||||||
|
return SchemelessUrlSegment(word)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (urls.withoutScheme.contains(word)) return SchemelessUrlSegment(word)
|
if (urls.withScheme.contains(word)) {
|
||||||
|
parseNowhereLink(word)?.let { return it }
|
||||||
if (urls.withScheme.contains(word)) return LinkSegment(word)
|
return LinkSegment(word)
|
||||||
|
}
|
||||||
|
|
||||||
if (urls.emails.contains(word)) return EmailSegment(word)
|
if (urls.emails.contains(word)) return EmailSegment(word)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user