|
|
@ -1198,13 +1198,15 @@ public class HtmlHelper {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void cleanup(Document d) {
|
|
|
|
static void cleanup(Document d) {
|
|
|
|
for (Element aspace : d.select(".Apple-converted-space"))
|
|
|
|
for (Element aspace : d.select(".Apple-converted-space")) {
|
|
|
|
if (aspace.previousSibling() instanceof TextNode) {
|
|
|
|
Node next = aspace.nextSibling();
|
|
|
|
TextNode tnode = (TextNode) aspace.previousSibling();
|
|
|
|
if (next instanceof TextNode) {
|
|
|
|
|
|
|
|
TextNode tnode = (TextNode) next;
|
|
|
|
tnode.text(tnode.text() + " ");
|
|
|
|
tnode.text(tnode.text() + " ");
|
|
|
|
aspace.remove();
|
|
|
|
aspace.remove();
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
aspace.replaceWith(new TextNode(" "));
|
|
|
|
aspace.replaceWith(new TextNode(" "));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static boolean truncate(Document d, boolean reformat) {
|
|
|
|
static boolean truncate(Document d, boolean reformat) {
|
|
|
|