patdiff.lib
Patdiff_format.Rule
A rule consists of a styled prefix, a styled suffix, and a style. Rules are applied to strings using functions defined in Output_ops.
module Affix : sig ... end
An affix is either a prefix or a suffix.
type t = private {
pre : Affix.t;
suf : Affix.t;
styles : Style.t list;
}
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val create : ?pre:Affix.t -> ?suf:Affix.t -> Style.t list -> t
Rule creation: Most rules have a style, and maybe a prefix. For instance, a line_next rule might have a bold "+" prefix and a green style.
val blank : t
val unstyled_prefix : string -> t
val strip_styles : t -> t