Remove permalinkSymbol # from table of contents
MODIFY
website/static/js/index.js
website/static/js/index.js
const elements = {
mobileHandle: document.getElementsByClassName('mobile-handle')[0],
toc: document.getElementsByClassName('toc-container')[0],
+ tocLinks: [...document.querySelectorAll('.toc-container a')],
sidebar: document.getElementsByClassName('sidebar')[0],
overlay: document.getElementsByClassName('overlay')[0],
headings: [...document.querySelectorAll('.content h1, .content h2, .content h3')],
@@ -97,6 +98,11 @@ function mobileToggleEvent(event){
toc.highlight();
}
+//remove permalinkSymbol "#" from table of contents
+elements.tocLinks.forEach(function(link){
+ link.innerText = link.innerText.replace(/(\s#)$/,'');
+});
+
toc.highlight();
elements.toc.addEventListener('click', toc.handleClick, false);

Remove permalinkSymbol # from table of contents