1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Improved debugging

This commit is contained in:
M66B 2020-11-14 19:48:34 +01:00
parent 97d8728986
commit cf05256111

View file

@ -2404,13 +2404,17 @@ public class HtmlHelper {
}, document.body());
if (debug)
for (int i = ssb.length() - 1; i >= 0; i--)
if (ssb.charAt(i) == '\n')
for (int i = ssb.length() - 1; i >= 0; i--) {
char kar = ssb.charAt(i);
if (kar == '\n')
ssb.insert(i, "|");
else if (ssb.charAt(i) == ' ')
else if (kar == ' ')
ssb.replace(i, i + 1, "_");
else if (ssb.charAt(i) == '\u00A0')
else if (kar == '\u00A0')
ssb.replace(i, i + 1, "");
else if (!Character.isLetterOrDigit(kar))
ssb.replace(i, i + 1, "{" + Integer.toHexString((int) kar) + "}");
}
Object[] spans = ssb.getSpans(0, ssb.length(), Object.class);
Map<Object, Integer> start = new HashMap<>();