vty-ui-extras-0.1: Extra vty-ui functionality not included in the core library

Graphics.Vty.Widgets.Extras.Text

Synopsis

Documentation

highlight :: RegexLike r String => r -> Attr -> FormatterSource

A highlight formatter takes a regular expression used to scan the text and an attribute to assign to matches. The regular expression is only applied to individual string tokens (individual words, whitespace strings, etc.); it is NOT applied to whole lines, paragraphs, or text spanning multiple lines. If you have need of that kind of functionality, apply your own attributes with your own regular expression prior to calling setTextWithAttrs.