Make URLSpans with trailing URL not marked up (#2813)
This commit is contained in:
parent
3bc1fc4606
commit
d1482324cc
2 changed files with 36 additions and 0 deletions
|
@ -78,6 +78,7 @@ fun markupHiddenUrls(context: Context, content: CharSequence): SpannableStringBu
|
|||
false
|
||||
} else {
|
||||
val text = spannableContent.subSequence(start, spannableContent.getSpanEnd(it)).toString()
|
||||
.split(' ').lastOrNull() ?: ""
|
||||
var textDomain = getDomain(text)
|
||||
if (textDomain.isBlank()) {
|
||||
textDomain = getDomain("https://$text")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue