removeBegin = previous.offset + previous.length;
} else {
if (parent.children.length > 1) {
// remove the comma of the next node
const next = parent.children[1];
removeEnd = next.offset;
}
return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, formattingOptions);
} else {