| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
HTMLEntities.Decoder
Description
Utilities, which execute the parser.
- type Decoder a = Text -> Either String a
- htmlEntity :: Decoder Text
- htmlEncodedText :: Decoder Builder
Documentation
htmlEntity :: Decoder Text Source
A decoder of a single entity.
>>>htmlEntity "©"Right "\169"
htmlEncodedText :: Decoder 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" library.
>>>fmap TLB.toLazyText $ htmlEncodedText "€5 ¢2"Right "\8364\&5 \162\&2"