1
0
silverbullet/packages/common/syscalls/markdown.ts
2022-04-25 10:33:38 +02:00

13 lines
377 B
TypeScript

import { SysCallMapping } from "@plugos/plugos/system";
import { parse } from "../parse_tree";
import { Language } from "@codemirror/language";
import type { ParseTree } from "../tree";
export function markdownSyscalls(lang: Language): SysCallMapping {
return {
"markdown.parseMarkdown": (ctx, text: string): ParseTree => {
return parse(lang, text);
},
};
}