safe-coloured-text 0.3.0.0 → 0.3.0.1
raw patch · 3 files changed
+18/−1 lines, 3 files
Files
- CHANGELOG.md +6/−0
- safe-coloured-text.cabal +1/−1
- src/Text/Colour.hs +11/−0
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog for safe-coloured-text +## [0.3.0.1] - 2024-03-26++### Added++* `unlinesChunks`+ ## [0.3.0.0] - 2024-03-26 ### Removed
safe-coloured-text.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: safe-coloured-text-version: 0.3.0.0+version: 0.3.0.1 synopsis: Safely output coloured text category: User Interfaces homepage: https://github.com/NorfairKing/safe-coloured-text#readme
src/Text/Colour.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE OverloadedStrings #-}+ -- | Safe Coloured Text -- -- This module is responsible for defining, building, and rendering coloured text.@@ -66,6 +68,9 @@ -- * Rendering + -- ** Composing chunks+ unlinesChunks,+ -- ** Rendering chunks to strict bytestring in UTF8 renderChunksUtf8BS, renderChunkUtf8BS,@@ -118,3 +123,9 @@ -- | Print a list of chunks to the given 'Handle' with given 'TerminalCapabilities' in an encoding according to the system's locale. hPutChunksLocaleWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO () hPutChunksLocaleWith tc h cs = TIO.hPutStr h $ renderChunksText tc cs++-- | Render lines of chunks.+--+-- This puts newlines ("\n") inbetween the lines.+unlinesChunks :: [[Chunk]] -> [Chunk]+unlinesChunks = concatMap (<> [chunk "\n"])