{-# OPTIONS_HADDOCK hide #-}

module Language.Hanspell.Decoder (decodeEntity) where

import qualified Data.Text as T
import qualified Data.Text.Lazy as TL

import HTMLEntities.Decoder
import Data.Text.Lazy.Builder

-- HTML entity decoder.
decodeEntity :: String -> String
decodeEntity :: String -> String
decodeEntity = Text -> String
T.unpack (Text -> String) -> (String -> Text) -> String -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Text
TL.toStrict (Text -> Text) -> (String -> Text) -> String -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Builder -> Text
toLazyText (Builder -> Text) -> (String -> Builder) -> String -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Builder
htmlEncodedText (Text -> Builder) -> (String -> Text) -> String -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
T.pack