Module Atd.Doc

type inline =
| Text of string
| Code of string

Text is regular text. Code is text that was enclosed within \{\{ \}\} and should be rendered using the same fixed-width font used in all verbatim text.

type block =
| Paragraph of inline list
| Pre of string

Paragraph is a regular paragraph. Pre is preformatted text that was enclosed within \{\{\{ \}\}\} and should be rendered using a fixed-width font preserving all space and newline characters.

type doc = block list

A document is a list of paragraph-like blocks.

val parse_text : Ast.loc -> string -> doc

Parse the contents of a doc.text annotation.

val get_doc : Ast.loc -> Ast.annot -> doc option

Get and parse doc data from annotations.

val html_of_doc : doc -> string

Convert parsed doc into HTML.