DjotDjot documents: parse, traverse, render.
The tree types are the extracted ones from Kernel, re-exported with their constructors, so a value from the kernel and a value from this module are the same value. Every syntax extension is a constructor defined in the Rocq development; there are no extension points here.
module Kernel = Djot_kernelmodule Attr : sig ... endmodule Profile : sig ... endmodule Node : sig ... endHow a tree is written as djot source by to_string.
`Safe: text is escaped and delimiters are braced by fixed rules, so that the result parses back to the tree. Fast, and not what a person would type: 3\:1, {_a_}.`Naive: the text a person would type, for a tree built by hand. Nothing is escaped, emphasis and quotes are written without braces where they read back as such, table columns are padded, and a blank line inside a container is empty. Text is written as it is, so a paragraph holding - x reads back as a list and a*b*c as strong emphasis.`Checked: `Naive wherever that parses to the same tree as `Safe does, and `Safe for the top-level blocks where it does not. The result always parses as the `Safe one. Costs two parses of the result, more when blocks differ.module Inline : sig ... endmodule Block : sig ... endmodule Textloc : sig ... endmodule Frontmatter : sig ... endYAML metadata at the start of a text, between two lines of ---:
module Doc : sig ... endA parsed document: its blocks, and the footnotes and references they define.
module Source : sig ... endA djot text together with its parse, for texts that change.
module Stream : sig ... end/*
module For_testing : sig ... end/*
module Mapper : sig ... endmodule Folder : sig ... endmodule Html : sig ... end