Skip to content

Commit 36d101f

Browse files
committed
Quartz sync: Jun 5, 2025, 11:55 PM
1 parent 95f9db7 commit 36d101f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quartz/components/scripts/slide.inline.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function handleFootnote(data: string, separator: string) {
165165

166166
const hrefRegex = /<sup><a href="(#user-content-fn[^"]+)"/g
167167
slide = slide.replace(hrefRegex, () => {
168-
return `<sup><a href="${window.location.pathname}#${slides.length}"`
168+
return `<sup><a href="${window.location.pathname}${window.location.search}#${slides.length}"`
169169
})
170170

171171
// const refRegex = /<sup><a\s+[^>]*?href="([^"]+)"[^>]*?id="user-content-fnref-([\d-]+)"[^>]*?>.*?<\/a><\/sup>/g
@@ -180,7 +180,7 @@ function handleFootnote(data: string, separator: string) {
180180
/<a\s+([^>]*?)href="(#user-content-fn[^"]+)"([^>]*)>/g,
181181
(fullMatch, beforeHref, href, afterHref) => {
182182
if (refIndexMap.has(href)) {
183-
return `<a ${beforeHref}href="${window.location.pathname}#${refIndexMap.get(href)}"${afterHref}>`
183+
return `<a ${beforeHref}href="${window.location.pathname}${window.location.search}#${refIndexMap.get(href)}"${afterHref}>`
184184
}
185185
return fullMatch
186186
}

0 commit comments

Comments
 (0)