atom-conduit 0.4.0.0 → 0.4.0.1
raw patch · 3 files changed
+9/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Text/Atom/Conduit/Parse.hs +1/−1
- atom-conduit.cabal +1/−1
- test/Main.hs +7/−7
Text/Atom/Conduit/Parse.hs view
@@ -205,7 +205,7 @@ -- > </title> atomText :: MonadThrow m => Text -> ConduitM Event o m (Maybe AtomText) atomText name = tagName' name (optional (requireAttr "type") <* ignoreAttrs) handler- where handler (Just "xhtml") = AtomXHTMLText <$> force "<div>" (tagIgnoreAttrs' "div" xhtmlContent)+ where handler (Just "xhtml") = AtomXHTMLText <$> force "<div>" (tagIgnoreAttrs "{http://www.w3.org/1999/xhtml}div" xhtmlContent) handler (Just "html") = AtomPlainText TypeHTML <$> content handler _ = AtomPlainText TypeText <$> content
atom-conduit.cabal view
@@ -1,5 +1,5 @@ name: atom-conduit-version: 0.4.0.0+version: 0.4.0.1 synopsis: Streaming parser/renderer for the Atom 1.0 standard (RFC 4287). description: Please refer to README. license: PublicDomain
test/Main.hs view
@@ -69,7 +69,7 @@ result <- runResourceT . runConduit $ sourceList input =$= XML.parseText' def =$= XML.force "Invalid <link>" atomLink result ^. linkHrefL @?= AtomURI (RelativeRef Nothing "/feed" (Query []) Nothing) (result ^. linkRelL) @?= "self"- where input = ["<link rel=\"self\" href=\"/feed\" />"]+ where input = ["<link xmlns=\"http://www.w3.org/2005/Atom\" rel=\"self\" href=\"/feed\" />"] personCase :: TestTree personCase = testCase "Person construct" $ do@@ -78,7 +78,7 @@ result ^. personEmailL @?= "JohnDoe@example.com" result ^. personUriL @?= Just (AtomURI $ URI (Scheme "http") (Just $ Authority Nothing (Host "example.com") Nothing) "/~johndoe" (Query []) Nothing) where input =- [ "<author>"+ [ "<author xmlns=\"http://www.w3.org/2005/Atom\">" , "<name>John Doe</name>" , "<email>JohnDoe@example.com</email>" , "<uri>http://example.com/~johndoe</uri>"@@ -92,7 +92,7 @@ (result ^. generatorVersionL) @?= "1.0" toNullable (result ^. generatorContentL) @?= "Example Toolkit" where input =- [ "<generator uri=\"/myblog.php\" version=\"1.0\">"+ [ "<generator xmlns=\"http://www.w3.org/2005/Atom\" uri=\"/myblog.php\" version=\"1.0\">" , "Example Toolkit" , "</generator>" ]@@ -105,7 +105,7 @@ show <$> (result ^. sourceUpdatedL) @?= Just "2003-12-13 18:30:02 UTC" (result ^. sourceRightsL) @?= Just (AtomPlainText TypeText "© 2005 Example, Inc.") where input =- [ "<source>"+ [ "<source xmlns=\"http://www.w3.org/2005/Atom\">" , "<id>http://example.org/</id>" , "<title>Fourty-Two</title>" , "<updated>2003-12-13T18:30:02Z</updated>"@@ -120,11 +120,11 @@ b @?= AtomPlainText TypeHTML "AT&T bought <b>by SBC</b>!" c @?= AtomXHTMLText "AT&T bought <b xmlns=\"http://www.w3.org/1999/xhtml\"><em>by SBC</em></b>!" where input =- [ "<title type=\"text\">AT&T bought by SBC!</title>"- , "<title type=\"html\">"+ [ "<title xmlns=\"http://www.w3.org/2005/Atom\" type=\"text\">AT&T bought by SBC!</title>"+ , "<title xmlns=\"http://www.w3.org/2005/Atom\" type=\"html\">" , "AT&amp;T bought <b>by SBC</b>!" , "</title>"- , "<title type=\"xhtml\">"+ , "<title xmlns=\"http://www.w3.org/2005/Atom\" type=\"xhtml\">" , "<div xmlns=\"http://www.w3.org/1999/xhtml\">" , "AT&T bought <b><em>by SBC</em></b>!" , "</div>"