2022-04-06 21:39:20 +08:00
|
|
|
import { SysCallMapping } from "../../plugos/system";
|
2022-04-12 02:34:09 +08:00
|
|
|
import { parse } from "../parse_tree";
|
|
|
|
import { Language } from "@codemirror/language";
|
|
|
|
import type { ParseTree } from "../tree";
|
2022-04-04 00:12:16 +08:00
|
|
|
|
2022-04-12 02:34:09 +08:00
|
|
|
export function markdownSyscalls(lang: Language): SysCallMapping {
|
2022-04-04 17:51:41 +08:00
|
|
|
return {
|
2022-04-12 02:34:09 +08:00
|
|
|
"markdown.parseMarkdown": (ctx, text: string): ParseTree => {
|
|
|
|
return parse(lang, text);
|
2022-04-04 17:51:41 +08:00
|
|
|
},
|
|
|
|
};
|
2022-04-04 00:12:16 +08:00
|
|
|
}
|