aboutsummaryrefslogblamecommitdiffstats
path: root/webui/src/Content.js
blob: 19f576317b47128b574f09febd86c77dfc50bece (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;