mirror of https://github.com/M66B/FairEmail.git
Skip recognized domain names before 'at' sign
This commit is contained in:
parent
273f377789
commit
d5eca31bc3
|
@ -237,13 +237,15 @@ public class HtmlHelper {
|
|||
parent = parent.parent();
|
||||
}
|
||||
|
||||
boolean atStart = (matcher.start() > 0 && text.charAt(matcher.start() - 1) == '@');
|
||||
boolean atEnd = (matcher.end() < text.length() && text.charAt(matcher.end()) == '@');
|
||||
|
||||
if (BuildConfig.DEBUG)
|
||||
Log.i("Web url=" + matcher.group() +
|
||||
" " + matcher.start() + "..." + matcher.end() +
|
||||
" linked=" + linked);
|
||||
" " + matcher.start() + "..." + matcher.end() + "/" + text.length() +
|
||||
" linked=" + linked + " start=" + atStart + " end=" + atEnd);
|
||||
|
||||
if (linked ||
|
||||
(matcher.start() > 0 && text.charAt(matcher.start() - 1) == '@'))
|
||||
if (linked || atStart || atEnd)
|
||||
span.appendText(text.substring(pos, matcher.end()));
|
||||
else {
|
||||
span.appendText(text.substring(pos, matcher.start()));
|
||||
|
|
Loading…
Reference in New Issue