perf(richtext): collapse nowhere-link classifier into the existing URL branches

This commit is contained in:
Claude
2026-05-18 22:54:35 +00:00
parent a2da9ae2c6
commit b16d44721c
@@ -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 }
return SchemelessUrlSegment(word)
}
if (urls.withoutScheme.contains(word)) return SchemelessUrlSegment(word)
if (urls.withScheme.contains(word)) return LinkSegment(word)
if (urls.withScheme.contains(word)) {
parseNowhereLink(word)?.let { return it }
return LinkSegment(word)
}
if (urls.emails.contains(word)) return EmailSegment(word)