Skip to content

Commit 3252eb7

Browse files
dear-lizhihuaTheDutchCoder
authored andcommitted
fix anchor bug (chinese language) (#1864)
Fix `parseAnchor` not properly working for the Chinese language
1 parent 2c75064 commit 3252eb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utilities/markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function parseAnchor(string) {
149149

150150
return {
151151
title: clean,
152-
id: clean.replace(/[^\w]+/g, '-').toLowerCase()
152+
id: clean.replace(/[^\w\u4e00-\u9fa5]+/g, '-').toLowerCase()
153153
};
154154
}
155155

0 commit comments

Comments
 (0)