package mdx

  1. Overview
  2. Docs

Lines

type line =
  1. | Section of int * string
  2. | Text of string
  3. | Block of Block.t

The type for the lines of a markdown or cram file.

val pp_line : ?syntax:Syntax.t -> line Fmt.t

pp_line is the pretty-printer for markdown or cram lines.

Document

type t = line list

The type for mdx documents.

val pp : ?syntax:Syntax.t -> t Fmt.t

pp is the pretty printer for mdx documents. Should be idempotent with of_string.

val dump : t Fmt.t

dump is the printer for dumping mdx documents. Useful for debugging.

val to_string : t -> string

to_string t converts the document t to a string.

val envs : t -> Mdx__.Ocaml_env.Set.t
OCaml

Innovation. Community. Security.