xml-conduit 0.5.0 → 0.5.0.1
raw patch · 3 files changed
+15/−10 lines, 3 filesdep ~attoparsec-conduitPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: attoparsec-conduit
API changes (from Hackage documentation)
Files
- Text/XML/Stream/Parse.hs +4/−3
- test/main.hs +9/−2
- xml-conduit.cabal +2/−5
Text/XML/Stream/Parse.hs view
@@ -250,9 +250,10 @@ => ParseSettings -> C.Conduit TS.Text m Event parseText de =- dropBOM C.=$= tokenize- C.=$= toEventC- C.=$= addBeginEnd+ dropBOM+ C.=$= tokenize+ C.=$= toEventC+ C.=$= addBeginEnd where tokenize = C.sequenceSink () $ const $ C.Emit () . return <$> sinkToken de addBeginEnd = C.conduitState
test/main.hs view
@@ -34,6 +34,7 @@ it "is idempotent to parse and pretty render a document" documentParsePrettyRender it "ignores the BOM" parseIgnoreBOM it "strips duplicated attributes" stripDuplicateAttributes+ it "displays comments" testRenderComments describe "XML Cursors" $ do it "has correct parent" cursorParent it "has correct ancestor" cursorAncestor@@ -303,9 +304,15 @@ , (Name "bar" (Just "namespace") (Just "x"), [ContentText "bin"]) ] []) []) +testRenderComments :: Assertion+testRenderComments =do+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<foo><!--comment--></foo>"+ @=? D.renderLBS def (Document (Prologue [] Nothing [])+ (Element "foo" [] [NodeComment "comment"]) [])+ resolvedInline :: Assertion resolvedInline = do Res.Document _ root _ <- return $ Res.parseLBS_ Res.def "<!DOCTYPE foo [<!ENTITY bar \"baz\">]><foo>&bar;</foo>" root @?= Res.Element "foo" [] [Res.NodeContent "baz"]- Res.Document _ root _ <- return $ Res.parseLBS_ Res.def "<!DOCTYPE foo [<!ENTITY bar \"baz\">]><foo bar='&bar;'/>"- root @?= Res.Element "foo" [("bar", "baz")] []+ Res.Document _ root2 _ <- return $ Res.parseLBS_ Res.def "<!DOCTYPE foo [<!ENTITY bar \"baz\">]><foo bar='&bar;'/>"+ root2 @?= Res.Element "foo" [("bar", "baz")] []
xml-conduit.cabal view
@@ -1,5 +1,5 @@ name: xml-conduit-version: 0.5.0+version: 0.5.0.1 license: BSD3 license-file: LICENSE author: Michael Snoyman <michaels@suite-sol.com>, Aristid Breitkreuz <aristidb@googlemail.com>@@ -26,13 +26,10 @@ homepage: http://github.com/snoyberg/xml extra-source-files: test/main.hs -flag test- default: False- library build-depends: base >= 4 && < 5 , conduit >= 0.0 && < 0.1- , attoparsec-conduit >= 0.0 && < 0.1+ , attoparsec-conduit >= 0.0.0.1 && < 0.1 , blaze-builder-conduit >= 0.0 && < 0.1 , bytestring >= 0.9 && < 0.10 , text >= 0.7 && < 0.12