lib/actions/split-join-tag.js
function joinTag(editor, node, syntax) {
	// Remove everything between the end of opening tag and the end of closing tag
	const open = getText(editor, node.open);
	const m = open.match(/\s*>$/);
	const start = node.open.end.translate([0, m ? -m[0].length : 0]);
	editor.setTextInBufferRange(new Range(start, node.end),
		selfClosingStyle[syntax] || selfClosingStyle.xhtml);
}
function joinTag(editor, node, syntax) {
	// Remove everything between the end of opening tag and the end of closing tag
	const open = getText(editor, node.open);
	const m = open.match(/\s*>$/);
	const start = node.open.end.translate([0, m ? -m[0].length : 0]);
	editor.setTextInBufferRange(new Range(start, node.end),
		selfClosingStyle[syntax] || selfClosingStyle.xhtml);
}
function joinTag ( editor , node , syntax ) { // Remove everything between the end of opening tag and the end of closing tag const open = getText ( editor , node . open ) ; const m = open . match ( / \s*>$ / ) ; const start = node . open . end . translate ( [ 0 , m ? - m [ 0 ] . length : 0 ] ) ; editor . setTextInBufferRange ( new Range ( start , node . end ) , selfClosingStyle [ syntax ] || selfClosingStyle . xhtml ) ; }
Joins given tag into single, unary tag
@param  {TextEditor} editor
@param  {Node}       node
@param  {String}     syntax Host document syntax, defines how self-closing tag
should be displayed
Joins given tag into single unary tag