Releases: qexat/ansifmt
Releases · qexat/ansifmt
0.3.0
CHANGES:
Features
- Add
Custom
token type variant which takes a styling, for tokens without particular semantics. - Add
Formatting.Element
that supersedesFormatting.Tree
. - Add
Formatting.Interfaces.TO_ELEMENT
interface which establishes the contract to convert to a formatting element that is used by formatting and printing utilitary functions such asformat
andIO.print_formatted
. - Expose the
Int8
module that is used byColor
. - Add
Token.number
to easily construct a number literal token.
Removed
- Remove
Formatting.Tree
,Formatting.TOKENIZABLE
and its associated functions. UseFormatting.Element
instead. - Remove the
Prelude
module. It has merged with the coreAnsifmt
module. - Remove
print_formatted
alias from the prelude. The function can still be found asIO.print_formatted
. - Remove
make_styling
alias from the prelude. The function can still be found asStyling.create
.
Internal
- Renamed
Utils
toInternal
. Formatting
is now a directory instead of a file containing all its submodules.- Added
List.intersperse
andList.singleton
(used inFormatting.Element
). - Added
Bool.tautology
(used inFormatting.Element
).
0.2.0
CHANGES:
Features
- Add color functions
luminance
andbest_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
Removed
Util.parenthesize_if
which is deemed unuseful and is kind of a duplicate ofTree.parenthesize_if
inFormatting
.
0.1.3
0.1.2
CHANGES:
Fixes
- Moved
Formatting.tokenize
andFormatting.format
to a dedicatedFormatting.Util
submodule - it is common for users who wish to implementTOKENIZABLE
toopen Formatting
, andFormatting.tokenize
would then shadow the user's own function, making it cumbersome if the latter was recursive.
This does not affect theAnsifmt
prelude -format
stays available.