errata v0.4.0.0 Release Notes
-
โ Added styling individual pointers with
PointerStyle
(e.g. characters, highlighting).- This changes how
styleLine
andhighlight
works and movesstyleUnderline
toPointerStyle
. - This also adds a
PointerStyle
parameter to the helper functions so e.g.blockSimple fancyStyle ...
should now beblockSimple fancyStyle fancyPointer ...
. - Crazy example from the tests (you can imagine coloring things differently):
an error --> here:1:1 | 1 | abcdefghijk | .. ~~ ^^ z | | : | | 2 y | 1 x 2 | lmnopqrstuv | ''' w an error occurred here
- This changes how
๐ Moved existing and added new premade styles to
Errata.Styles
.Errata
no longer exports premade styles. Also movedhighlight
there.โ Added support for characters with different widths (full-width, combining characters, others). The cabal flag
usewcwidth
(default false) can be enabled to use the nativewcwidth
function.โ Added support for replacing tabs with spaces with the
styleTabWidth
option inStyle
(defaults to 4).โ Added option for the lines before and after the omission line with
styleExtraLinesAfter
andstyleExtraLinesBefore
inStyle
.โ Added option for padding lines before and after the source
stylePaddingTop
andstylePaddingBottom
inStyle
.โ Added option for disabling the hook with
styleEnableHook
inPointerStyle
.โ Added option for toggling all decorations completely with
styleEnableDecorations
inStyle
. Useful if you only want highlighting and not underlining. Combine withstylePaddingTop = False
for a compact source code block.โ Added option for toggling the line prefixes with
styleEnableLinePrefix
inStyle
.โ Added
Show
instances to all the types. Style functions are applied to some sample text.๐ Changed
Monoid
constraint ofSource
to just requiring anemptySource
value.๐ Fixed trailing whitespace in the omission line.