Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities, which execute the parser.
Synopsis
- htmlEntity :: Text -> Either String Text
- htmlEntityBody :: Text -> Either String Text
- htmlEncodedText :: Text -> Builder
Documentation
htmlEntity :: Text -> Either String Text Source #
A decoder of a single entity.
>>>
mapM_ Data.Text.IO.putStrLn $ htmlEntity "©"
©
htmlEntityBody :: Text -> Either String Text Source #
A decoder of a single entity.
>>>
mapM_ Data.Text.IO.putStrLn $ htmlEntityBody "#169"
©
htmlEncodedText :: Text -> Builder Source #
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