package mdx

  1. Overview
  2. Docs

Lines

type syntax = Syntax.t =
  1. | Normal
  2. | Cram
  3. | Mli
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 -> 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 Fmt.t

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

val to_string : t -> string

to_string t converts the document t to a string.

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

Innovation. Community. Security.