We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f028f45 commit f8de6b0Copy full SHA for f8de6b0
web_src/js/markup/anchors.ts
@@ -6,7 +6,8 @@ const hasPrefix = (str: string): boolean => str.startsWith('user-content-');
6
7
// scroll to anchor while respecting the `user-content` prefix that exists on the target
8
function scrollToAnchor(encodedId: string): void {
9
- if (!encodedId) return;
+ // Ignore the footnote case, as the link is rendered by the backend.
10
+ if (!encodedId || encodedId.startsWith('fn:') || encodedId.startsWith('fnref:')) return;
11
const id = decodeURIComponent(encodedId);
12
const prefixedId = addPrefix(id);
13
let el = document.querySelector(`#${prefixedId}`);
0 commit comments