Remove <section> unwrapping code from ve.ce.MWTransclusionNode

Has been fixed upstream in Parsoid.

Bug: T181226
Change-Id: I7dfe228e6d1008c4e66377d501f2e4af72c1813d
This commit is contained in:
Ed Sanders 2017-11-30 17:31:16 +00:00
parent 5b36d88eae
commit ec3c6b65c0

View file

@ -89,20 +89,15 @@ ve.ce.MWTransclusionNode.static.getDescription = function ( model ) {
* @return {HTMLElement[]} Filtered rendered nodes
*/
ve.ce.MWTransclusionNode.static.filterRendering = function ( contentNodes ) {
var whitespaceRegex, wrapper;
var whitespaceRegex;
if ( !contentNodes.length ) {
return;
}
whitespaceRegex = new RegExp( '^[' + ve.dm.Converter.static.whitespaceList + ']+$' );
wrapper = contentNodes[ 0 ].ownerDocument.createElement( 'div' );
// Unwrap Parsoid sections (which probably shouldn't exist: T181226)
contentNodes.forEach( function ( node ) { wrapper.appendChild( node ); } );
ve.unwrapParsoidSections( wrapper );
ve.stripParsoidFallbackIds( wrapper );
contentNodes = Array.prototype.slice.call( wrapper.childNodes );
contentNodes.forEach( ve.stripParsoidFallbackIds );
// Filter out auto-generated items, e.g. reference lists
contentNodes = contentNodes.filter( function ( node ) {