h6");
    let previousHeading;
    let currentSectionList = document.createElement("ul");
    tocElement.appendChild(currentSectionList);
    
    headings.forEach((heading, index) => {
      currentSectionList = getTocList(
        heading,
        previousHeading,
        currentSectionList
      );
      setIdFromContent(heading, index);
      addNavLink(heading, currentSectionList);
    
      headingIds.push(heading.id);
      headingIntersectionData[heading.id] = {
        y: 0
      };
      previous