|
|
@ -1530,7 +1530,8 @@ public class HtmlHelper {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Matcher matcher = pattern.matcher(text);
|
|
|
|
Matcher matcher = pattern.matcher(text);
|
|
|
|
if (matcher.find()) {
|
|
|
|
if (matcher.find())
|
|
|
|
|
|
|
|
try {
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
|
|
|
|
|
|
|
|
int pos = 0;
|
|
|
|
int pos = 0;
|
|
|
@ -1548,6 +1549,12 @@ public class HtmlHelper {
|
|
|
|
String group = matcher.group();
|
|
|
|
String group = matcher.group();
|
|
|
|
int start = matcher.start();
|
|
|
|
int start = matcher.start();
|
|
|
|
int end = matcher.end();
|
|
|
|
int end = matcher.end();
|
|
|
|
|
|
|
|
if (start < pos || start > end) {
|
|
|
|
|
|
|
|
Log.e("Autolink pos=" + pos +
|
|
|
|
|
|
|
|
" start=" + start + " end=" + end +
|
|
|
|
|
|
|
|
" len=" + group.length() + "/" + text.length());
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Workarounds
|
|
|
|
// Workarounds
|
|
|
|
if (group.endsWith(".")) {
|
|
|
|
if (group.endsWith(".")) {
|
|
|
@ -1605,6 +1612,8 @@ public class HtmlHelper {
|
|
|
|
|
|
|
|
|
|
|
|
tnode.before(span);
|
|
|
|
tnode.before(span);
|
|
|
|
tnode.text("");
|
|
|
|
tnode.text("");
|
|
|
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
|
|
|
Log.e(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|