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