packages feed

html-entities 1.0.1.1 → 1.1.0.0

raw patch · 2 files changed

+4/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- HTMLEntities.Decoder: type Decoder a = Text -> Either String a
- HTMLEntities.Decoder: htmlEncodedText :: Decoder Builder
+ HTMLEntities.Decoder: htmlEncodedText :: Text -> Builder
- HTMLEntities.Decoder: htmlEntity :: Decoder Text
+ HTMLEntities.Decoder: htmlEntity :: Text -> Either String Text

Files

html-entities.cabal view
@@ -1,7 +1,7 @@ name:   html-entities version:-  1.0.1.1+  1.1.0.0 synopsis:   A codec library for HTML-escaped text and HTML-entities description:
library/HTMLEntities/Decoder.hs view
@@ -8,15 +8,12 @@ import qualified HTMLEntities.Parser as P  -type Decoder a =-  Text -> Either String a- -- | -- A decoder of a single entity. --  -- >>> mapM_ Data.Text.IO.putStrLn $ htmlEntity "&#169;" -- ©-htmlEntity :: Decoder Text+htmlEntity :: Text -> Either String Text htmlEntity =   P.parseOnly $   P.htmlEntity <* P.endOfInput@@ -31,8 +28,9 @@ --  -- >>> mapM_ (Data.Text.Lazy.IO.putStrLn . Data.Text.Lazy.Builder.toLazyText) $ htmlEncodedText "&euro;5 &cent;2" -- €5 ¢2-htmlEncodedText :: Decoder TLB.Builder+htmlEncodedText :: Text -> TLB.Builder htmlEncodedText =+  fmap (either (error "HTMLEntities.Decoder: impossible happened") id) $   P.parseOnly $   fmap fold $   many $