html-tokenizer 0.5 → 0.5.1
raw patch · 3 files changed
+7/−10 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- html-tokenizer.cabal +2/−9
- library/HTMLTokenizer/Parsing.hs +1/−1
- tests/Main.hs +4/−0
html-tokenizer.cabal view
@@ -1,18 +1,11 @@ name: html-tokenizer version:- 0.5+ 0.5.1 synopsis: An "attoparsec"-based HTML tokenizer description:- This library can be used as a basis for complex HTML parsers,- or for streaming.- E.g., by composing it with- <http://hackage.haskell.org/package/list-t-attoparsec the "list-t-attoparsec" library>- you can produce a token stream,- thus becoming able to implement a highly efficient stream-parser,- which works in a single pass, constant memory and is capable of early termination.- <http://hackage.haskell.org/package/list-t-html-parser "list-t-html-parser"> is such a parser.+ This library can be used as a basis for streaming HTML parsers. category: Parsing, HTML, XML homepage:
library/HTMLTokenizer/Parsing.hs view
@@ -20,11 +20,11 @@ token :: Parser Token token = labeled "HTML Token" $+ DoctypeToken <$> doctype <|> openingTag OpeningTagToken <|> ClosingTagToken <$> closingTag <|> TextToken <$> textBetweenTags <|> CommentToken <$> comment <|>- DoctypeToken <$> doctype <|> fail "Invalid token" {-|
tests/Main.hs view
@@ -60,6 +60,10 @@ (Right (A.ClosingTagToken (A.UnprefixedName "x"))) "</x>" ,+ testTokenParsing "Closing tag"+ (Right (A.DoctypeToken "html"))+ "<!DOCTYPE html>"+ , testTokensParsing "Text between tags, stripped" (Right [