Skip to content

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
- Add CHANGES entry
- Bump version in dune-project
- Remove unnecessary function
  • Loading branch information
qexat committed Feb 3, 2025
1 parent a420493 commit e2f927c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(name ansifmt)

(version 0.2.0b4)
(version 0.2.0)

(generate_opam_files true)

Expand Down
8 changes: 0 additions & 8 deletions lib/Formatting.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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. *)
Expand Down

0 comments on commit e2f927c

Please sign in to comment.