mirror of https://github.com/M66B/FairEmail.git
Autolink workarounds
This commit is contained in:
parent
ae51a3397b
commit
97757c9b89
|
@ -914,11 +914,18 @@ public class HtmlHelper {
|
|||
int start = matcher.start();
|
||||
int end = matcher.end();
|
||||
|
||||
// Workaround for links between parenthesis
|
||||
if (group.endsWith(")") &&
|
||||
start > 0 && text.charAt(start - 1) == '(') {
|
||||
group = group.substring(0, group.length() - 1);
|
||||
// Workarounds
|
||||
if (group.endsWith(".")) {
|
||||
end--;
|
||||
group = group.substring(0, group.length() - 1);
|
||||
}
|
||||
if (group.startsWith("(")) {
|
||||
start++;
|
||||
group = group.substring(1);
|
||||
}
|
||||
if (group.endsWith(")")) {
|
||||
end--;
|
||||
group = group.substring(0, group.length() - 1);
|
||||
}
|
||||
|
||||
boolean email = group.contains("@") && !group.contains(":");
|
||||
|
|
Loading…
Reference in New Issue