logseq/mldoc

Markdown public

jjlee opened this issue · 1 comments

jjlee commented

Seems there's a markdown parser in here too, is that intended to be public too? Sorry if this should be obvious, I'm new to OCaml (have written one OCaml program so far!).

I ask because I'd like to try experimenting with defining a subset of org that I could roundtrip through markdown using some sort of tacked-on custom extra annotations (in both the markdown and the org formats) to indicate e.g. when org headings should be markdown bullets and when they should be markdown headings. Thought maybe this might be suitable for that?

yes, the markdown parser is intended to be public too, mldoc adds some org mode features into markdown :)

let config = Mldoc.Conf.{toc = false; heading_number = false; keep_line_break = true; format = Conf.Markdown; heading_to_list = false};;

I ask because I'd like to try experimenting with defining a subset of org that I could roundtrip through markdown using some sort of tacked-on custom extra annotations (in both the markdown and the org formats) to indicate e.g. when org headings should be markdown bullets and when they should be markdown headings.

One way is to use the block properties, logseq adds a heading property to mark a block as a markdown heading.