diff options
Diffstat (limited to 'src/Erebos/TextFormat.hs')
| -rw-r--r-- | src/Erebos/TextFormat.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Erebos/TextFormat.hs b/src/Erebos/TextFormat.hs new file mode 100644 index 0000000..0bfad75 --- /dev/null +++ b/src/Erebos/TextFormat.hs @@ -0,0 +1,16 @@ +module Erebos.TextFormat ( + FormattedText, + + renderPlainText, +) where + +import Data.Text (Text) + +import Erebos.TextFormat.Types + + +renderPlainText :: FormattedText -> Text +renderPlainText = \case + PlainText text -> text + ConcatenatedText ftexts -> mconcat $ map renderPlainText ftexts + FormattedText _ ftext -> renderPlainText ftext |