mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 03:19:24 +01:00
Simplified newline handling
This commit is contained in:
@@ -276,7 +276,7 @@ public class HtmlEx {
|
||||
|
||||
private /* static */ void withinBlockquoteConsecutive(StringBuilder out, Spanned text, int start,
|
||||
int end) {
|
||||
out.append("<p").append(getTextDirection(text, start, end)).append(">");
|
||||
out.append("<span").append(getTextDirection(text, start, end)).append(">");
|
||||
|
||||
int next;
|
||||
for (int i = start; i < end; i = next) {
|
||||
@@ -294,21 +294,21 @@ public class HtmlEx {
|
||||
|
||||
withinParagraph(out, text, i, next - nl);
|
||||
|
||||
if (nl == 1) {
|
||||
if (nl == 0) {
|
||||
out.append("<br>\n");
|
||||
} else {
|
||||
for (int j = 2; j < nl; j++) {
|
||||
for (int j = 0; j < nl; j++) {
|
||||
out.append("<br>");
|
||||
}
|
||||
if (next != end) {
|
||||
/* Paragraph should be closed and reopened */
|
||||
out.append("</p>\n");
|
||||
out.append("<p").append(getTextDirection(text, start, end)).append(">");
|
||||
out.append("</span>\n");
|
||||
out.append("<span").append(getTextDirection(text, start, end)).append(">");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out.append("</p>\n");
|
||||
out.append("</span>\n");
|
||||
}
|
||||
|
||||
private /* static */ void withinParagraph(StringBuilder out, Spanned text, int start, int end) {
|
||||
|
||||
Reference in New Issue
Block a user