This commit is contained in:
Zef Hemel
2023-01-21 13:37:55 +01:00
parent 9fbe78dadd
commit a4c103e127
11 changed files with 137 additions and 16 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
import { parseMarkdown } from "$sb/silverbullet-syscall/markdown.ts";
import type { WidgetContent } from "$sb/app_event.ts";
import { renderMarkdownToHtml } from "./markdown_render.ts";
export async function markdownWidget(
bodyText: string,
): Promise<{ html: string; script: string }> {
): Promise<WidgetContent> {
const mdTree = await parseMarkdown(bodyText);
const html = renderMarkdownToHtml(mdTree, {