From 49e83b148c9a99c4c1f55fd85dd2d447e8e4d39a Mon Sep 17 00:00:00 2001 From: Sakari <20642596+sakarie9@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:28:34 +0800 Subject: [PATCH] fix: CJK characters in TOC scroll indicator --- layouts/partials/toc.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index e9dc950f..b3170110 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -33,7 +33,7 @@ h.each(function (i, e) { e = $(e); if (e.offset().top - $(window).height()/3 <= currentScroll) { - id = e.attr('id'); + id = decodeURIComponent(e.attr('id')); } }); var active = $toc.find('a.active'); @@ -62,4 +62,4 @@ } })(); -{{ end }} \ No newline at end of file +{{ end }}