summaryrefslogtreecommitdiff
path: root/pages/view.tsx
blob: da281091c16ffefa64c327f3f0cc58a094f62d53 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import unified from 'unified';
import parse from 'uniorg-parse';
import uniorg2rehype from 'uniorg-rehype';
import rehypeStringify from 'rehype-stringify';
import React from 'react';

export interface ViewPageProps {

}
export default function ViewPage(props: ViewPageProps) {

    const processor = unified().use(parse)
        .use(uniorg2rehype)
        .use(rehypeStringify);

    processor
        .process(`* org-mode example\n your text goes here`)
        .then((file) => console.log(file.contents));

    return (
        <div>
        </div>
    )
}