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();
|
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)
|
if (BuildConfig.DEBUG)
|
||||||
Log.i("Web url=" + matcher.group() +
|
Log.i("Web url=" + matcher.group() +
|
||||||
" " + matcher.start() + "..." + matcher.end() +
|
" " + matcher.start() + "..." + matcher.end() + "/" + text.length() +
|
||||||
" linked=" + linked);
|
" linked=" + linked + " start=" + atStart + " end=" + atEnd);
|
||||||
|
|
||||||
if (linked ||
|
if (linked || atStart || atEnd)
|
||||||
(matcher.start() > 0 && text.charAt(matcher.start() - 1) == '@'))
|
|
||||||
span.appendText(text.substring(pos, matcher.end()));
|
span.appendText(text.substring(pos, matcher.end()));
|
||||||
else {
|
else {
|
||||||
span.appendText(text.substring(pos, matcher.start()));
|
span.appendText(text.substring(pos, matcher.start()));
|
||||||
|
|
Loading…
Reference in New Issue