packages feed

html-tokenizer 0.6.2 → 0.6.3

raw patch · 3 files changed

+18/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

html-tokenizer.cabal view
@@ -1,7 +1,7 @@ name:   html-tokenizer version:-  0.6.2+  0.6.3 synopsis:   An "attoparsec"-based HTML tokenizer description:
library/HTMLTokenizer/Parsing.hs view
@@ -34,7 +34,10 @@               (asciiCI "doctype" $> doctypeTagBody))           (mplus             (char '/' $> closingTagBody)-            (pure openingTagBody)))+            (pure+              (mplus+                openingTagBody+                (pure (TextToken "<"))))))       (pure (TextToken <$> textBetweenTags)))   where     commentTagBody =
tests/Main.hs view
@@ -10,6 +10,7 @@ import qualified HTMLTokenizer.Parsing as B import qualified Data.Attoparsec.Text as C import qualified Data.Vector as D+import qualified Data.Text.IO as E   main =@@ -99,6 +100,8 @@           A.ClosingTagToken (A.UnprefixedName "x")         ])       "<x>a&lt;c & #120;</x>"+    ,+    sample1   ]   where     testTokenParsing name expectedResult text =@@ -108,3 +111,13 @@       testCase name $       assertEqual "" expectedResult (C.parseOnly (many B.token <* C.endOfInput) text) +sample1 :: TestTree+sample1 =+  testGroup "sample1" $+  [+    testCase "A quite broken stream should parse in full" $+    assertBool "" (not (null (C.parseOnly (many B.token <* C.endOfInput) pageContents)))+  ]+  where+    pageContents =+      unsafePerformIO (E.readFile "samples/1.html")