= {};
    
  function getTocList(heading, previousHeading, currentListElement) {
    let listSection = currentListElement;
    if (previousHeading) {
      if (heading.tagName.slice(-1) > previousHeading.tagName.slice(-1)) {
        let nextSection = document.createElement("ul");
        listSection.appendChild(nextSection);
        return nextSection;
      } else if (heading.tagName.slice(-1) < previousHeading.tagName.slice(-1)) {
        let indentationDiff =
          parseInt(previousHeading.tagName.sl