Skip to content

Commit c3ba161

Browse files
committed
Fixed issue with non-percent encoded anchors in table of contents
1 parent 4ad2dc1 commit c3ba161

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

material/assets/javascripts/bundle.efa0ade1.min.js renamed to material/assets/javascripts/bundle.8bbcded3.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/javascripts/bundle.efa0ade1.min.js.map renamed to material/assets/javascripts/bundle.8bbcded3.min.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
</script>
241241
{% endblock %}
242242
{% block scripts %}
243-
<script src="{{ 'assets/javascripts/bundle.efa0ade1.min.js' | url }}"></script>
243+
<script src="{{ 'assets/javascripts/bundle.8bbcded3.min.js' | url }}"></script>
244244
{% for path in config.extra_javascript %}
245245
<script src="{{ path | url }}"></script>
246246
{% endfor %}

src/assets/javascripts/components/toc/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function watchTableOfContents(
134134
/* Compute anchor-to-target mapping */
135135
const anchors = getElements<HTMLAnchorElement>("[href^=\\#]", el)
136136
for (const anchor of anchors) {
137-
const id = anchor.hash.substring(1)
137+
const id = decodeURIComponent(anchor.hash.substring(1))
138138
const target = getOptionalElement(`[id="${id}"]`)
139139
if (typeof target !== "undefined")
140140
table.set(anchor, target)

0 commit comments

Comments
 (0)