Skip to content

Commit

Permalink
fix: hash locating of cjk heading isn't working (jeffreytse#44)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeffreytse committed May 27, 2021
1 parent 8a5b85e commit 2d9a85a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions _includes/extensions/hashlocate.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
function hashLocate(hashValue) {
hashValue = hashValue.replace(/^.*#h-/, '');
hashValue = decodeURIComponent(hashValue);
var element = document.getElementById(hashValue);

if (!element) {
Expand Down

0 comments on commit 2d9a85a

Please sign in to comment.