aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/Content.js
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/Content.js')
-rw-r--r--webui/src/Content.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/webui/src/Content.js b/webui/src/Content.js
new file mode 100644
index 00000000..19f57631
--- /dev/null
+++ b/webui/src/Content.js
@@ -0,0 +1,15 @@
+import unified from 'unified';
+import parse from 'remark-parse';
+import html from 'remark-html';
+import remark2react from 'remark-react';
+
+const Content = ({ markdown }) => {
+ const processor = unified()
+ .use(parse)
+ .use(html)
+ .use(remark2react);
+
+ return processor.processSync(markdown).contents;
+};
+
+export default Content;