2022-10-10 12:50:21 +00:00
|
|
|
import { SysCallMapping } from "../../plugos/system.ts";
|
2023-10-03 12:16:33 +00:00
|
|
|
import { parse } from "../markdown_parser/parse_tree.ts";
|
2022-10-14 13:11:33 +00:00
|
|
|
import type { ParseTree } from "$sb/lib/tree.ts";
|
2024-01-24 12:34:12 +00:00
|
|
|
import { extendedMarkdownLanguage } from "../markdown_parser/parser.ts";
|
2022-10-10 12:50:21 +00:00
|
|
|
|
2024-01-24 12:34:12 +00:00
|
|
|
export function markdownSyscalls(): SysCallMapping {
|
2022-10-10 12:50:21 +00:00
|
|
|
return {
|
|
|
|
"markdown.parseMarkdown": (_ctx, text: string): ParseTree => {
|
2024-01-24 12:34:12 +00:00
|
|
|
return parse(extendedMarkdownLanguage, text);
|
2022-10-10 12:50:21 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|