-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A codec library for HTML-escaped text and HTML-entities -- -- This library provides the following APIs for coding and decoding of -- HTML-escaped text: -- --
-- >>> Data.Text.Lazy.IO.putStrLn $ Data.Text.Lazy.Builder.toLazyText $ text "<a href=\"\">" -- <a href=""> --text :: Text -> Builder -- | Attoparsec parsers. module HTMLEntities.Parser -- | A parser of a single entity. -- -- Parses numeric encoding: -- --
-- >>> mapM_ Data.Text.IO.putStrLn $ Data.Attoparsec.Text.parseOnly htmlEntity "©" -- © ---- -- as well as named entities: -- --
-- >>> mapM_ Data.Text.IO.putStrLn $ Data.Attoparsec.Text.parseOnly htmlEntity "©" -- © --htmlEntity :: Parser Text -- | Utilities, which execute the parser. module HTMLEntities.Decoder -- | A decoder of a single entity. -- --
-- >>> mapM_ Data.Text.IO.putStrLn $ htmlEntity "©" -- © --htmlEntity :: Text -> Either String Text -- | A decoder of a text with entities. -- -- Produces a text builder, which you can then convert into a text or a -- lazy text, using the "text" or "conversion-text" -- library. -- --
-- >>> Data.Text.Lazy.IO.putStrLn $ Data.Text.Lazy.Builder.toLazyText $ htmlEncodedText "€5 ¢2" -- €5 ¢2 --htmlEncodedText :: Text -> Builder module HTMLEntities.Text -- | HTML-encodes the given char. char :: Char -> Text -- | HTML-encodes the given text. -- --
-- >>> Data.Text.IO.putStrLn $ text "<a href=\"\">" -- <a href=""> --text :: Text -> Text