diff options
-rw-r--r-- | anyons.html | 0 | ||||
-rw-r--r-- | org-roam-ui.el | 3 | ||||
-rw-r--r-- | pages/view.tsx | 24 | ||||
-rw-r--r-- | util/orga.js | 8 | ||||
-rw-r--r-- | util/uniorg.js | 10 |
5 files changed, 44 insertions, 1 deletions
diff --git a/anyons.html b/anyons.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/anyons.html diff --git a/org-roam-ui.el b/org-roam-ui.el index 86e1324..a4c81c1 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -267,7 +267,8 @@ Returns the node with an updated title if the current node is a reference node and the key was found in the bibliography, otherwise the node is returned unchanged." (if-let* (org-roam-ui-retitle-ref-nodes - (boundp 'org-ref-cite-re) + ;; set a fake var because if-let(((boundp 'fake-var))) returns true + (orcr (boundp 'org-ref-cite-re)) (citekey (cdr (assoc "ROAM_REFS" (nth 4 node)))) (ref (org-roam-ui--citekey-to-ref citekey)) (title (org-roam-ui--find-ref-title ref))) diff --git a/pages/view.tsx b/pages/view.tsx new file mode 100644 index 0000000..da28109 --- /dev/null +++ b/pages/view.tsx @@ -0,0 +1,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> + ) +} diff --git a/util/orga.js b/util/orga.js new file mode 100644 index 0000000..4f85eeb --- /dev/null +++ b/util/orga.js @@ -0,0 +1,8 @@ +const stream = import('unified-stream') +const reorg = require('@orgajs/reorg') +const mutate = require('@orgajs/reorg-rehype') +const html = import('rehype-stringify') + +const processor = reorg().use(mutate).use(html) + +process.stid.pipe(stream(processor)).pipe(process.stdout) diff --git a/util/uniorg.js b/util/uniorg.js new file mode 100644 index 0000000..cc046e9 --- /dev/null +++ b/util/uniorg.js @@ -0,0 +1,10 @@ + +import { unified } from 'unified'; +var createStream = import('unified-stream'); +var uniorgParse = import('uniorg-parse'); +var uniorg2rehype = import('uniorg-rehype'); +var html = import('rehype-stringify'); + +var processor = unified().use(uniorgParse).use(uniorg2rehype).use(html); + +process.stdin.pipe(createStream(processor)).pipe(process.stdout); |