guipenedo HF Staff commited on
Commit
d209f57
·
1 Parent(s): 9d89847

fix toc links

Browse files
Files changed (1) hide show
  1. index.html +1 -1
index.html CHANGED
@@ -743,7 +743,7 @@
743
  const isException = el.getAttribute('no-toc');
744
  if (isInTitle || isException) continue;
745
  el.setAttribute('id', el.textContent.toLowerCase().replaceAll(" ", "_"))
746
- const link = '<a href="' + '#' + el.getAttribute('id') + '">' + el.textContent + '</a>';
747
 
748
  const level = el.tagName === 'H2' ? 0 : (el.tagName === 'H3' ? 1 : 2);
749
  while (prevLevel < level) {
 
743
  const isException = el.getAttribute('no-toc');
744
  if (isInTitle || isException) continue;
745
  el.setAttribute('id', el.textContent.toLowerCase().replaceAll(" ", "_"))
746
+ const link = '<a target="_self" href="' + '#' + el.getAttribute('id') + '">' + el.textContent + '</a>';
747
 
748
  const level = el.tagName === 'H2' ? 0 : (el.tagName === 'H3' ? 1 : 2);
749
  while (prevLevel < level) {