diff --git a/CHANGES.md b/CHANGES.md index 7af856d..682026c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,20 @@ +# 0.2.0 + +## Features + +- Add color functions `luminance` and `best_for_contrast`. (by @chshersh in #5) +- Add styling functions `fg`, `bg`, `bold`, `dim`, `italic`, `underlined`. (by @chshersh in #6) +- Add styling composition with `&`. (by @chshersh in #6) +- Add function `make_rgb_hex` to parse hexadecimal codes into RGB colors. (by @chshersh in #7) + +## Breaking Changes + +- `Color.t` and `Color.Ground.t` are now polymorphic variants. + +## Removed + +- `Util.parenthesize_if` which is deemed unuseful and is kind of a duplicate of `Tree.parenthesize_if` in `Formatting`. + # 0.1.3 ## Fixes diff --git a/dune-project b/dune-project index 50bebb3..4709ece 100644 --- a/dune-project +++ b/dune-project @@ -2,7 +2,7 @@ (name ansifmt) -(version 0.2.0b4) +(version 0.2.0) (generate_opam_files true) diff --git a/lib/Formatting.ml b/lib/Formatting.ml index aecc1ed..458b434 100644 --- a/lib/Formatting.ml +++ b/lib/Formatting.ml @@ -144,14 +144,6 @@ module Util = struct fun value ~using:(module M) -> M.tokenize value ;; - let parenthesize_if - : type t. (t -> bool) -> t -> using:(module TOKENIZABLE with type t = t) -> Tree.t - = - fun predicate value ~using:(module M) -> - let base = tokenize value ~using:(module M) in - if predicate value then Tree.parenthesized base else base - ;; - (** [format ?stylizer value ~using:(module M)] transforms the [value] into a pretty-printable string using the [stylizer] if [M] provides tokenization for the [value] type. *)