1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-23 14:41:08 +00:00

Always remove extra newlines from last paragraph

This commit is contained in:
M66B 2020-08-05 08:18:02 +02:00
parent b2df1d16a6
commit a9dcf095f6

View file

@ -304,8 +304,8 @@ public class HtmlHelper {
static Document fixEdit(Document document) {
// Prevent extra newline at end
Element body = document.body();
if (body != null && body.childrenSize() == 1) {
Element holder = body.child(0);
if (body != null && body.childrenSize() > 0) {
Element holder = body.child(body.childrenSize() - 1);
if ("p".equals(holder.tagName())) {
holder.tagName("span");
int c = holder.childrenSize();