mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-06 04:45:50 +01:00
Autolink workarounds
This commit is contained in:
@@ -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(":");
|
||||
|
||||
Reference in New Issue
Block a user