ice(-1)) -
          parseInt(heading.tagName.slice(-1));
        while (indentationDiff > 0) {
          listSection = listSection.parentElement;
          indentationDiff--;
        }
      }
    }
    return listSection;
  }
    
  function setIdFromContent(element, appendedId) {
    if (!element.id) {
      element.id = `${element.innerHTML
        .replace(/:/g, "")
        .trim()
        .toLowerCase()
        .split(" ")
        .join("-")}-${appendedId}`;
    }
  }
    
  function addNavLink(headin