blob: 0bfad75990d6b94e05cb28e59c7e958f45e92166 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|