Merge pull request #1443 from sakarie9/dev

🐛 Fix TOC scroll indicator with CJK characters
This commit is contained in:
Nuno Coração 2024-05-13 21:43:42 +01:00 committed by GitHub
commit 83b9670c7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,7 @@
h.each(function (i, e) { h.each(function (i, e) {
e = $(e); e = $(e);
if (e.offset().top - $(window).height()/3 <= currentScroll) { if (e.offset().top - $(window).height()/3 <= currentScroll) {
id = e.attr('id'); id = decodeURIComponent(e.attr('id'));
} }
}); });
var active = $toc.find('a.active'); var active = $toc.find('a.active');
@ -62,4 +62,4 @@
} }
})(); })();
</script> </script>
{{ end }} {{ end }}