Factor out markdown widget rendering

This commit is contained in:
Zef Hemel
2023-10-29 10:02:50 +01:00
parent 23e99b0c46
commit 50caba8522
17 changed files with 102 additions and 77 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { CodeWidgetContent } from "$sb/types.ts";
import { SysCallMapping } from "../../plugos/system.ts";
import { Client } from "../client.ts";
@@ -9,7 +10,7 @@ export function widgetSyscalls(
_ctx,
lang: string,
body: string,
): Promise<{ html: string; script: string }> => {
): Promise<CodeWidgetContent> => {
const langCallback = client.system.codeWidgetHook.codeWidgetCallbacks.get(
lang,
);