aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/render.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nuldoc-src/render.ts')
-rw-r--r--nuldoc-src/render.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/nuldoc-src/render.ts b/nuldoc-src/render.ts
new file mode 100644
index 0000000..feb72a4
--- /dev/null
+++ b/nuldoc-src/render.ts
@@ -0,0 +1,13 @@
+import { Node } from "./dom.ts";
+import { renderHtml } from "./renderers/html.ts";
+
+// export type RendererType = "html" | "xml";
+export type RendererType = "html";
+
+export function render(root: Node, renderer: RendererType): string {
+ if (renderer === "html") {
+ return renderHtml(root);
+ } else {
+ return renderHtml(root);
+ }
+}