diff --git a/_includes/sidebar/article-menu.html b/_includes/sidebar/article-menu.html index 3e618ff73d8..672a73e890f 100644 --- a/_includes/sidebar/article-menu.html +++ b/_includes/sidebar/article-menu.html @@ -25,10 +25,16 @@ // Generate post menu var menuHTML = ''; for (var i = 0; i < headings.length; i++) { - var h = headings[i]; - menuHTML += ( - '
  • ' - + '' + h.textContent + '
  • '); + const h = headings[i]; + let textContent = ""; + + h.childNodes.forEach((value) => { + if (value.nodeType !== Node.ELEMENT_NODE || value.role !== "doc-noteref") { + textContent += value.textContent; + } + }); + + menuHTML += `
  • ${textContent}
  • `; } menuContent.innerHTML = '';