ITextRegion regionBeforeTagClose = regions.get(regions.size() - 1 - 1);
// insert a space separator before tag close if the previous
// region does not have extra spaces
if (regionBeforeTagClose.getTextLength() == regionBeforeTagClose.getLength())
structuredDocument.replaceText(structuredDocument, startStructuredDocumentRegion.getStartOffset(lastRegion), 0, " "); //$NON-NLS-1$
}
} else {
String tagName = node.getNodeName();
String endTag = END_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);