Skip to content

Commit

Permalink
Tweak for #84
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw authored Sep 25, 2023
1 parent b9a0210 commit dafef52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/pages/{topic}/{slug}.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ <h3>Related</h3>
let id = null;
let newStyle = el.querySelector('.heading-link');
if (newStyle) {
// Keep using existing ID on element
id = el.getAttribute('id');
// Need to pull the text out of the link
id = newStyle.getAttribute('href').replace('#', '');
let text = newStyle.innerText;
el.removeChild(newStyle);
el.innerText = text;
Expand Down

0 comments on commit dafef52

Please sign in to comment.