Module Djot.Inline

type math_style = Kernel.Ast.math_style =
  1. | DisplayMath
  2. | InlineMath
type target = Kernel.Ast.target =
  1. | Direct of string
  2. | Reference of string
type quote_type = Kernel.Ast.quote_type =
  1. | SingleQuotes
  2. | DoubleQuotes
type t = Kernel.Ast.inline =
  1. | Str of string
  2. | Emph of t node list
  3. | Strong of t node list
  4. | Highlight of t node list
  5. | Insert of t node list
  6. | Delete of t node list
  7. | Superscript of t node list
  8. | Subscript of t node list
  9. | Verbatim of string
  10. | Symbol of string
  11. | Math of math_style * string
  12. | Image of t node list * target
  13. | Span of string * t node list
    (*

    The string is a name, written :name[...], an extension (Profile.with_ext_tags); empty means unnamed.

    *)
  14. | FootnoteReference of string
  15. | RawInline of string * string
  16. | NonBreakingSpace
  17. | Quoted of quote_type * t node list
  18. | SoftBreak
  19. | HardBreak
  20. | Hole of string
    (*

    An extension (Profile.with_ext_holes): %`e`, the expression read as the code span's content is. The parser never reads it.

    *)
val to_plain_text : t node list -> string

The text a heading identifier is derived from.

val to_string : ?profile:Profile.t -> ?style:style -> t node list -> string

The inlines as djot source, as they are written inside a paragraph, a soft or hard break ending a line.

  • parameter style

    default `Checked, which reads the inlines as one paragraph