|
|
@ -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()));
|
|
|
|