Fix chinese auchor link
This commit is contained in:
parent
9d30ac7435
commit
9a1db6ed43
3 changed files with 9 additions and 3 deletions
|
|
@ -49,7 +49,7 @@ export function scrollActiveSidebar () {
|
|||
export function scrollIntoView () {
|
||||
const id = window.location.hash.match(/#[^#\/]+$/g)
|
||||
if (!id || !id.length) return
|
||||
const section = document.querySelector(id[0])
|
||||
const section = document.querySelector(decodeURIComponent(id[0]))
|
||||
|
||||
if (section) section.scrollIntoView()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue