+ childParts = children[i].toXML(level + 1);
+
+ if(i === children.length - 1 && node.contents().length === 2) {
+ $(node.contents()[0]).after(childParts);
+ prevChildParts = childParts;
+ continue;
+ }
+
+ if(prevChildParts && prevChildParts.length > 1 && prevChildParts[0].nodeType === Node.TEXT_NODE && prevChildParts[1].nodeType === Node.TEXT_NODE) {
+ $(node.contents()[0]).after(childParts);
+ prevChildParts = childParts;
+ continue;
+ }