src/parse/state/tag.js/stripWhitespace
function stripWhitespace ( element ) {
	if ( element.children.length ) {
		const firstChild = element.children[0];
		const lastChild = element.children[ element.children.length - 1 ];

		if ( firstChild.type === 'Text' ) {
			firstChild.data = trimStart( firstChild.data );
			if ( !firstChild.data ) element.children.shift();
		}

		if ( lastChild.type === 'Text' ) {
			lastChild.data = trimEnd( lastChild.data );
			if ( !lastChild.data ) element.children.pop();
		}
	}
}