From e921cdb6a60c4e5d4671547e84108be9a2fabeb0 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Thu, 21 Dec 2023 15:46:30 +0800 Subject: [PATCH] Add fuzzy search --- code/viewer_partial.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/viewer_partial.html b/code/viewer_partial.html index 96c2fda3..3517eda0 100644 --- a/code/viewer_partial.html +++ b/code/viewer_partial.html @@ -109,7 +109,10 @@ val.display = false; } - let candidates = miniSearch.search(search.value); + let candidates = miniSearch.search(search.value, { + prefix: true, + fuzzy: 0.2 + }); for (let val of candidates) { if (!groups.value.includes(val.group)) { continue;