mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-01 10:18:54 -04:00
Fixed table of contents following not working for percent-encoded URIs
This commit is contained in:
@@ -134,7 +134,7 @@ export function watchTableOfContents(
|
||||
/* Compute anchor-to-target mapping */
|
||||
const anchors = getElements<HTMLAnchorElement>("[href^=\\#]", el)
|
||||
for (const anchor of anchors) {
|
||||
const id = decodeURIComponent(anchor.hash.substring(1))
|
||||
const id = anchor.hash.substring(1)
|
||||
const target = getOptionalElement(`[id="${id}"]`)
|
||||
if (typeof target !== "undefined")
|
||||
table.set(anchor, target)
|
||||
|
||||
Reference in New Issue
Block a user