Skip to content

Conversation

@KianNH
Copy link
Member

@KianNH KianNH commented Oct 16, 2024

Summary

Fix footnotes with multiple references

@cloudflare-workers-and-pages
Copy link

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6ec3cc2
Status: ✅  Deploy successful!
Preview URL: https://28cc8a03.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://kian-pcx-14165.cloudflare-docs-7ou.pages.dev

View logs

@GregBrimble
Copy link
Contributor

Got an example of where this is used?

@KianNH
Copy link
Member Author

KianNH commented Oct 16, 2024


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 😢

@KianNH KianNH enabled auto-merge (squash) October 16, 2024 17:10
@KianNH KianNH merged commit 2ba7478 into production Oct 16, 2024
12 checks passed
@KianNH KianNH deleted the kian/PCX-14165 branch October 16, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants