diff --git a/plugs/index/builtins.ts b/plugs/index/builtins.ts index bb12bcff..fef53276 100644 --- a/plugs/index/builtins.ts +++ b/plugs/index/builtins.ts @@ -91,6 +91,11 @@ export const builtins: Record> = { pos: "!number", hooks: "hooksSpec", }, + table: { + ref: "!string", + page: "!string", + pos: "!number", + }, // System builtins syscall: { diff --git a/plugs/index/table.ts b/plugs/index/table.ts index ff61d505..cff238fc 100644 --- a/plugs/index/table.ts +++ b/plugs/index/table.ts @@ -1,4 +1,4 @@ -import { CompleteEvent, IndexTreeEvent, ObjectValue } from "$type/types.ts"; +import { IndexTreeEvent, ObjectValue } from "$type/types.ts"; import { collectNodesMatching, ParseTree } from "$lib/tree.ts"; import { indexObjects } from "./api.ts"; import { collectNodesOfType } from "$lib/tree.ts"; @@ -30,7 +30,6 @@ function concatChildrenTexts(nodes: ParseTree[]): string { } export async function indexTables({ name: pageName, tree }: IndexTreeEvent) { - console.log(`Indexing tables in '${pageName}'`); const result: ObjectValue[] = []; collectNodesMatching(tree, (t) => !!t.type?.startsWith("Table")).forEach( @@ -65,12 +64,9 @@ export async function indexTables({ name: pageName, tree }: IndexTreeEvent) { tableRow[label!] = content; }); result.push(tableRow); - - //console.log("Cells", cells); } }, ); - console.log("Found", result.length, "row(s)"); await indexObjects(pageName, result); }