1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 09:17:58 +00:00

Expand alignment span

This commit is contained in:
M66B 2020-10-03 16:56:59 +02:00
parent e9e656f763
commit 64f9f59c9f

View file

@ -2324,10 +2324,15 @@ public class HtmlHelper {
int f = flags.get(spans[i]);
if (spans[i] instanceof AlignmentSpan ||
spans[i] instanceof BulletSpan ||
spans[i] instanceof NumberSpan)
spans[i] instanceof NumberSpan) {
if (spans[i] instanceof AlignmentSpan &&
!(e > 1 && ssb.charAt(e - 1) == '\n') &&
e < ssb.length() && ssb.charAt(e) == '\n')
e++;
if (s > 1 && ssb.charAt(s - 1) == '\n' &&
e > 1 && ssb.charAt(e - 1) == '\n')
f |= Spanned.SPAN_PARAGRAPH;
}
ssb.setSpan(spans[i], s, e, f);
}