src/helpers.js
function cleanSingleHeader(e) {
  for (var headerIndex = 1; headerIndex < 7; headerIndex++) {
    var headers = e.getElementsByTagName('h' + headerIndex);
    for (var i = headers.length - 1; i >= 0; --i) {
      if (headers[i].nextSibling === null) {
        headers[i].parentNode.removeChild(headers[i]);
      }
    }
  }

}
function cleanSingleHeader(e) {
  for (var headerIndex = 1; headerIndex < 7; headerIndex++) {
    var headers = e.getElementsByTagName('h' + headerIndex);
    for (var i = headers.length - 1; i >= 0; --i) {
      if (headers[i].nextSibling === null) {
        headers[i].parentNode.removeChild(headers[i]);
      }
    }
  }

}
function cleanSingleHeader ( e ) { for ( var headerIndex = 1 ; headerIndex < 7 ; headerIndex ++ ) { var headers = e . getElementsByTagName ( 'h' + headerIndex ) ; for ( var i = headers . length - 1 ; i >= 0 ; -- i ) { if ( headers [ i ] . nextSibling === null ) { headers [ i ] . parentNode . removeChild ( headers [ i ] ) ; } } } }
Remove the header that doesn't have next sibling.

@param Element
@return void
Remove the header that doesn t have next sibling .