Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from mateossh/fix-anchors-with-code
Browse files Browse the repository at this point in the history
Fix anchors with <code> element
  • Loading branch information
mrpotatoes authored Mar 21, 2022
2 parents cfcda5e + 10e3906 commit b9d673c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dist/toc.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ aside.nav.nothing {
padding-left: 5px;
}

.page_toc a > * {
pointer-events: none;
}

.page_toc code {
background-color: #f8f8f8;
border-radius: 2px;
Expand Down
2 changes: 1 addition & 1 deletion dist/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var tocClick = function(e) {
});

// Make sure this is attached to the parent not itself
e.target.parentNode.setAttribute('class', 'active')
e.currentTarget.setAttribute('class', 'active')
};

var createList = function(wrapper, count) {
Expand Down

0 comments on commit b9d673c

Please sign in to comment.