Containers_pp.Ext
Extension node.
Custom nodes can be used to add user-defined behavior to the rendered output. For example, documents might be annotated with ANSI-terminal colors, or with HTML tags.
val make :
?width:('a -> int) ->
name:string ->
pre:(Out.t -> inside:'a option -> 'a -> unit) ->
post:(Out.t -> inside:'a option -> 'a -> unit) ->
unit ->
'a t
An extension is a custom document node. It takes a value of type 'a
, and a document d
, and can output what it wants based on the custom value before and after d
is printed.
The extension is considered to have width 0
, unless width
is specified.