packages feed

tagstream-conduit 0.2.1 → 0.2.2

raw patch · 2 files changed

+8/−10 lines, 2 filesdep ~blaze-builder-conduitdep ~conduit

Dependency ranges changed: blaze-builder-conduit, conduit

Files

Text/HTML/TagStream/Stream.hs view
@@ -2,22 +2,20 @@ module Text.HTML.TagStream.Stream where  import Data.ByteString (ByteString)-import Data.Attoparsec.Char8 (parseOnly) import qualified Data.ByteString.Char8 as S+import Data.Attoparsec.ByteString (parseOnly) import Data.Conduit import Text.HTML.TagStream.Parser import Text.HTML.TagStream.Types --- | like concatMap, with a accumerator.------ Since 0.0.0+-- | html parser conduit. tokenStream :: Resource m => Conduit ByteString m Token tokenStream = conduitState S.empty push close   where     push accum input =         case parseOnly html (accum `S.append` input) of+            Right (splitAccum -> (accum', tokens)) -> return $ StateProducing accum' tokens             Left err -> fail err-            Right (splitAccum -> (accum', tokens)) -> return (accum', Producing tokens)      close s = return $ if S.null s then [] else [Text s] 
tagstream-conduit.cabal view
@@ -1,10 +1,10 @@ Name:                tagstream-conduit-Version:             0.2.1+Version:             0.2.2 Synopsis:            streamlined html tag parser Description:     Tag-stream is a library for parsing HTML//XML to a token stream.     It can parse unstructured and malformed HTML from the web.-    It also provides an Enumeratee which can parse streamline html, which means it consumes constant memory.+    It provides a Conduit to parse html streamlined, which consumes constant memory.      You can start from the `tests/Tests.hs` module to see what it can do. Homepage:            http://github.com/yihuang/tagstream-conduit@@ -32,10 +32,10 @@                      , Text.HTML.TagStream.Utils   Build-depends:       base >= 4 && < 5                      , bytestring-                     , conduit >= 0.0.2+                     , conduit >= 0.2.0                      , attoparsec                      , blaze-builder-                     , blaze-builder-conduit+                     , blaze-builder-conduit >= 0.2.0  test-suite test     hs-source-dirs: tests@@ -43,7 +43,7 @@     type: exitcode-stdio-1.0     build-depends:     base >= 4 && < 5                      , bytestring-                     , conduit >= 0.0.2+                     , conduit >= 0.2.0                      , QuickCheck                      , HUnit                      , test-framework