Preserve space after image

This commit is contained in:
M66B 2023-03-18 14:36:46 +01:00
parent f97592345e
commit cf9cf24d94
1 changed files with 3 additions and 1 deletions

View File

@ -565,12 +565,14 @@ public class HtmlEx {
} else if (c > 0x7E || c < ' ') {
out.append("&#").append((int) c).append(";");
} else if (c == ' ') {
boolean img = (i - 1 >= 0 && text.charAt(i - i) == '\uFFFC');
while (i + 1 < end && text.charAt(i + 1) == ' ') {
out.append("&nbsp;");
i++;
}
out.append(' ');
out.append(img ? "&nbsp;" : ' ');
} else {
out.append(c);
}