code: function ( node, root, keepForBlankLine ) {
      var brs = node.querySelectorAll( 'BR' );
      var brBreaksLine = [];
      var l = brs.length;
      var i, br, parent;
  
      // Must calculate whether the <br> breaks a line first, because if we
      // have two <br>s next to each other, after the first one is converted
      // to a block split, the second will be at the end of a block and
      // therefore seem to not be a line break. But in its original context it
      // was, so we should also convert it to a block split.
      for ( i = 0; i < l; i += 1 ) {
        brBreaksLine[i] = isLineBreak( brs[i], keepForBlankLine );
      }
      while ( l-- ) {
        br = brs[l];
        // Cleanup may have removed it
        parent = br.parentNode;
        if ( !parent ) { continue; }
        // If it doesn't break a line, just remove it; it's not doing
        // anything useful. We'll add it back later if required by the
        // browser. If it breaks a line, wrap the content in div tags
        // and replace the brs.
        if ( !brBreaksLine[l] ) {
          detach( br );
        } else if ( !isInline( parent ) ) {
          fixContainer( parent, root );
        }
      }
    }
docs: <br> elements are treated specially, and differently depending on the browser, when in rich text editor mode. When adding HTML from external sources, we must remove them, replacing the ones that actually affect line breaks by wrapping the inline text in a <div>. Browsers that want <br> elements at the end of each block will then have them added back in a later fixCursor method call.