extensions/emmet/src/splitJoinTag.ts/splitJoinTag
export function splitJoinTag() {
	if (!validate(false) || !vscode.window.activeTextEditor) {
		return;
	}

	const editor = vscode.window.activeTextEditor;
	const document = editor.document;
	const rootNode = <HtmlFlatNode>getRootNode(editor.document, true);
	if (!rootNode) {
		return;
	}

	return editor.edit(editBuilder => {
		Array.from(editor.selections).reverse().forEach(selection => {
			const documentText = document.getText();
			const offset = document.offsetAt(selection.start);
			const nodeToUpdate = getHtmlFlatNode(documentText, rootNode, offset, true);
			if (nodeToUpdate) {
				const textEdit = getRangesToReplace(document, nodeToUpdate);
				editBuilder.replace(textEdit.range, textEdit.newText);
			}
		});
	});
}