Replacing fuzzy search with fuse.js

This commit is contained in:
Zef Hemel
2023-07-25 17:33:07 +02:00
parent 41fb82b9d2
commit 6510f06e0e
5 changed files with 75 additions and 7 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import { buildHandebarOptions } from "./util.ts";
import type { PageMeta } from "../../web/types.ts";
export async function queryComplete(completeEvent: CompleteEvent) {
const match = /#query ([\w\-_]+)*$/.exec(completeEvent.linePrefix);
const match = /#query ([\w\-_]*)$/.exec(completeEvent.linePrefix);
if (!match) {
return null;
}