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:
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>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% 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 %}
|
{% for script in config.extra_javascript %}
|
||||||
{{ script | script_tag }}
|
{{ script | script_tag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export function watchTableOfContents(
|
|||||||
const table = new Map<HTMLAnchorElement, HTMLElement>()
|
const table = new Map<HTMLAnchorElement, HTMLElement>()
|
||||||
|
|
||||||
/* Compute anchor-to-target mapping */
|
/* Compute anchor-to-target mapping */
|
||||||
const anchors = getElements<HTMLAnchorElement>("[href^=\\#]", el)
|
const anchors = getElements<HTMLAnchorElement>(".md-nav__link", el)
|
||||||
for (const anchor of anchors) {
|
for (const anchor of anchors) {
|
||||||
const id = decodeURIComponent(anchor.hash.substring(1))
|
const id = decodeURIComponent(anchor.hash.substring(1))
|
||||||
const target = getOptionalElement(`[id="${id}"]`)
|
const target = getOptionalElement(`[id="${id}"]`)
|
||||||
|
|||||||
Reference in New Issue
Block a user