extensions/emmet/src/updateTag.ts/getRangesFromNode
function getRangesFromNode(node: HtmlFlatNode, document: vscode.TextDocument): vscode.Range[] {
	let ranges: vscode.Range[] = [];
	if (node.open) {
		const start = document.positionAt(node.open.start);
		ranges.push(new vscode.Range(start.translate(0, 1),
			start.translate(0, 1).translate(0, node.name.length)));
	}
	if (node.close) {
		const endTagStart = document.positionAt(node.close.start);
		const end = document.positionAt(node.close.end);
		ranges.push(new vscode.Range(endTagStart.translate(0, 2), end.translate(0, -1)));
	}
	return ranges;
}