Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Very WIP and very temporary solution for reliably exporting Neorg documents into other formats via Pandoc. It will be deprecated once https://github.com/Simre1/neorg-haskell-parser is stable. You can test it right now, but it requires a
pandoc
binary to be available in your$PATH
. This unfortunately introduces a rather large Haskell dependency, therefore it does not completely replacecore.export
yet (although it will be deprecated by this module in the future).This module works by walking the AST of an norg document using
tree_map_rec
and transforming it into Pandoc's native JSON representation withvim.json.encode
, making it very efficient1. This is only an exporter; it is not a proper parser and does not allow for converting other formats to norg.If you're eager to try it out right now, add the module to your config, open an norg file and run
:Neorg pandoc json
. Don't panic if it errors out with node types as messages - those are just unimplemented and will not be included in the output. This will output JSON tojson.json
in your current working directory which can be read by Pandoc, for example:pandoc json.json -o test.md
. Keep in mind that this interface probably won't survive very long.Implementation status (copied from https://github.com/Simre1/neorg-haskell-parser#implementation-status)
Legend
Footnotes
Source: just trust me bro. There is currently no way to properly benchmark it since neither this module nor @Simre1's parser fully implement the spec. For now just believe me when I say it's fast enough for you not to notice it. ↩