mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed regression with table of contents in last release
This commit is contained in:
parent
02bf848fd5
commit
88004be010
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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 %}
|
||||
|
@ -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}"]`)
|
||||
|
Loading…
Reference in New Issue
Block a user