Fixes #258
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user