I'm merging two Google Docs together, by appending each of the elements from one document to the other. This works great, except for when I use appendTable() I'm getting an extra blank line after each table. After some digging, I discovered that this is actually a blank paragraph element.
In trying to remove this blank paragraph I thought maybe I could, after appending the table, remove the next sibling, like so:
var table = body.appendTable(element);
body.removeChild(table.getNextSibling());
However, I'm greeted with a, Can't remove the last paragraph in a document section.
message when I try this method.
Has anyone else figured out a way to remove this blank paragraph after using appendTable()?