Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/scripts/footnotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (footnotes) {
const content = note.querySelector("p") as HTMLParagraphElement;

const fnrefs = document.querySelectorAll<HTMLAnchorElement>(
`#${note.id.replace("fn", "fnref")}`,
`a[id^='${note.id.replace("fn", "fnref")}']`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, does duplicate ones do something like id="blah-2"? Is that why you're switching to ^=?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! You get user-content-fnref-2 and user-content-fnref-2-2 😢

);

for (const fnref of fnrefs) {
Expand Down
Loading