1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

Fixed regression with table of contents in last release

This commit is contained in:
squidfunk 2024-02-03 09:27:39 +07:00
parent 02bf848fd5
commit 88004be010
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
4 changed files with 6 additions and 6 deletions

View File

@ -249,7 +249,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.e1c3ead8.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.caa56a14.min.js' | url }}"></script>
{% for script in config.extra_javascript %}
{{ script | script_tag }}
{% endfor %}

View File

@ -132,7 +132,7 @@ export function watchTableOfContents(
const table = new Map<HTMLAnchorElement, HTMLElement>()
/* Compute anchor-to-target mapping */
const anchors = getElements<HTMLAnchorElement>("[href^=\\#]", el)
const anchors = getElements<HTMLAnchorElement>(".md-nav__link", el)
for (const anchor of anchors) {
const id = decodeURIComponent(anchor.hash.substring(1))
const target = getOptionalElement(`[id="${id}"]`)