mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 07:30:12 +01:00
Fixed table of contents following not working for percent-encoded URIs
This commit is contained in:
parent
19fb69e379
commit
64ca8fefd4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -240,7 +240,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.b78d2936.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.fc8c2696.min.js' | url }}"></script>
|
||||
{% for path in config.extra_javascript %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user