mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-02 14:58:14 +00:00
fix: toc for cyrillic and other non-latin alphabets (closes #396)
This commit is contained in:
parent
99dbe525d9
commit
36548d5986
2 changed files with 4 additions and 3 deletions
quartz/components/scripts
|
@ -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 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue