fix: toc for cyrillic and other non-latin alphabets (closes )

This commit is contained in:
Jacky Zhao 2023-08-22 22:41:50 -07:00
parent 99dbe525d9
commit 36548d5986
2 changed files with 4 additions and 3 deletions
quartz/components/scripts

View file

@ -64,7 +64,7 @@ async function navigate(url: URL, isBack: boolean = false) {
// scroll into place and add history
if (!isBack) {
if (url.hash) {
const el = document.getElementById(url.hash.substring(1))
const el = document.getElementById(decodeURIComponent(url.hash.substring(1)))
el?.scrollIntoView()
} else {
window.scrollTo({ top: 0 })