src/js/parse-content.js
function getHeadingObject (heading) {
    var obj = {
      id: heading.id,
      children: [],
      nodeName: heading.nodeName,
      headingLevel: getHeadingLevel(heading),
      textContent: heading.textContent.trim()
    }

    if (options.includeHtml) {
      obj.childNodes = heading.childNodes
    }

    return obj
  }
function getHeadingObject (heading) {
    var obj = {
      id: heading.id,
      children: [],
      nodeName: heading.nodeName,
      headingLevel: getHeadingLevel(heading),
      textContent: heading.textContent.trim()
    }

    if (options.includeHtml) {
      obj.childNodes = heading.childNodes
    }

    return obj
  }
function getHeadingObject ( heading ) { var obj = { id : heading . id , children : [ ] , nodeName : heading . nodeName , headingLevel : getHeadingLevel ( heading ) , textContent : heading . textContent . trim ( ) } if ( options . includeHtml ) { obj . childNodes = heading . childNodes } return obj }
Get important properties from a heading element and store in a plain object.
@param {HTMLElement} heading
@return {Object}
Get important properties from a heading element and store in a plain object .