function wrapChildNodes(parentNode) {
	        var index = 0;
	        Immutable.List(parentNode.childNodes)
	          .filter(function(node) {
	            return node.nodeType === Node.TEXT_NODE || !nodeHelpers.isBlockElement(node);
	          })
	          .groupBy(function(node, key, list) {
	            return key === 0 || node.previousSibling === list.get(key - 1) ?
	              index :
	              index += 1;
	          })
	          .forEach(function(nodeGroup) {
	            nodeHelpers.wrap(nodeGroup.toArray(), document.createElement('p'));
	          });
	      }
/**
	       * Wrap consecutive inline elements and text nodes in a P element.
	       */
Wrap consecutive inline elements and text nodes in a P element.
Wrap consecutive inline elements and text nodes in a P element .
function wrapChildNodes(parentNode) {
	        var index = 0;
	        Immutable.List(parentNode.childNodes)
	          .filter(function(node) {
	            return node.nodeType === Node.TEXT_NODE || !nodeHelpers.isBlockElement(node);
	          })
	          .groupBy(function(node, key, list) {
	            return key === 0 || node.previousSibling === list.get(key - 1) ?
	              index :
	              index += 1;
	          })
	          .forEach(function(nodeGroup) {
	            nodeHelpers.wrap(nodeGroup.toArray(), document.createElement('p'));
	          });
	      }
function wrapChildNodes ( parentNode ) { var index = 0 ; Immutable . List ( parentNode . childNodes ) . filter ( function ( node ) { return node . nodeType === Node . TEXT_NODE || ! nodeHelpers . isBlockElement ( node ) ; } ) . groupBy ( function ( node , key , list ) { return key === 0 || node . previousSibling === list . get ( key - 1 ) ? index : index += 1 ; } ) . forEach ( function ( nodeGroup ) { nodeHelpers . wrap ( nodeGroup . toArray ( ) , document . createElement ( 'p' ) ) ; } ) ; }
Wrap consecutive inline elements and text nodes in a P element.
Wrap consecutive inline elements and text nodes in a P element .