Replacing fuzzy search with fuse.js
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ export async function indexLinks({ name, tree }: IndexTreeEvent) {
|
||||
delete pageMeta[key];
|
||||
}
|
||||
}
|
||||
console.log("Extracted page meta data", pageMeta);
|
||||
// console.log("Extracted page meta data", pageMeta);
|
||||
await index.set(name, "meta:", pageMeta);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user