Module Expert.Write

type styler = {
start : ( Base.string -> Base.unit ) -> Base.unit;(*

called at start

*)
set : ( Base.string -> Base.unit ) -> Hardcaml_waveterm__Draw.Style.t -> Base.unit;(*

called for each element

*)
eol : ( Base.string -> Base.unit ) -> Base.unit;(*

called at end of each line

*)
finish : ( Base.string -> Base.unit ) -> Base.unit;(*

called at end

*)
}

stylting functions

val no_styler : styler

not styling information inserted

val html_styler : styler

Inline CSS per span element

val css_class_styler : styler

CSS specified with classes

val css_classes : Base.string

CSS classes for css_class_styler. Dump in CSS file or style tag.

val term_styler : styler

ANSI termianl escape codes

val html_escape : ?styler:styler -> ( Base.string -> Base.unit ) -> (Base.int * Hardcaml_waveterm__Draw.Style.t) Base.array Base.array -> Base.unit

write data as html escape code

val utf8 : ?styler:styler -> ( Base.string -> Base.unit ) -> (Base.int * Hardcaml_waveterm__Draw.Style.t) Base.array Base.array -> Base.unit

write data as utf-8