VitePress MiniSearch: Optimizing Russian Word Segmentation

This commit is contained in:
Meow
2026-05-25 06:19:18 +08:00
parent 64b8a52456
commit 6e044d091c
+1 -4
View File
@@ -235,10 +235,7 @@ export default defineConfig({
options: {
miniSearch: {
options: {
tokenize: (str) =>
str
.split(/[\s.,;!?'"(){}[\]\-_+=&%$#@~`^<>|\\]+/)
.filter(Boolean)
tokenize: (str) => str.match(/[\p{L}\p{N}]+/gu) ?? []
}
},
translations: {