Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from savetheclocktower/auto-toc-titles
Browse files Browse the repository at this point in the history
Add `title` attribute to auto-TOC links (fixes #2)
  • Loading branch information
confused-Techie authored Apr 11, 2024
2 parents feab33f + 20a4301 commit 2cd9a2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class AutoTOC {
}
return `
<li>
<a data-level="${item.level - this.rootLevel}" href="#${item.id}">${item.name}</a>
<a data-level="${item.level - this.rootLevel}" title="${item.name}" href="#${item.id}">${item.name}</a>
${list}
</li>
`;
Expand Down
3 changes: 3 additions & 0 deletions hovercard_resolution/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ async function resolve() {
if (doc.description) {
doc.description = mdRender(doc.description, { skip_hovercard: true })
}
if (typeof doc === "object") {
doc.value ??= simpleLabel;
}
bundles.push(doc);
}

Expand Down

0 comments on commit 2cd9a2f

Please sign in to comment.