fix: hash locating of cjk heading isn't working (#44)
When the heading includes CJK (Chinese, Japanese, Korean) characters, the hash locating isn't working correctly, the page will not automatically scroll to the corresponding heading.
This commit is contained in:
parent
c5212c60ad
commit
844aea6c74
1 changed files with 1 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
<script>
|
||||
function hashLocate(hashValue) {
|
||||
hashValue = hashValue.replace(/^.*#h-/, '');
|
||||
hashValue = decodeURIComponent(hashValue);
|
||||
var element = document.getElementById(hashValue);
|
||||
|
||||
if (!element) {
|
||||
|
|
Loading…
Reference in a new issue