1
0
silverbullet/web/syscalls/markdown.ts

13 lines
406 B
TypeScript
Raw Normal View History

import { SysCallMapping } from "../../plugos/system.ts";
import { parse } from "../../common/markdown_parser/parse_tree.ts";
import { Language } from "../deps.ts";
2022-10-14 13:11:33 +00:00
import type { ParseTree } from "$sb/lib/tree.ts";
export function markdownSyscalls(lang: Language): SysCallMapping {
return {
"markdown.parseMarkdown": (_ctx, text: string): ParseTree => {
return parse(lang, text);
},
};
}